|
|
| Welcome to the Monastery | |
| PerlMonks |
Answer: Why can't I access a cookie I have set? |
| ( #142306=categorized answer: print w/ replies, xml ) | Need Help?? |
|
Q&A > CGI programming > Why can't I access a cookie I have set? contributed by cLive ;-)
Let's assume you have a CGI object:
Cookies are accessed through $q->cookie('name'). Cookies are sent by the browser when requesting the page. If you set a cookie in a CGI script, the cookie is sent to the browser, but not set in $q->cookie. ie,
(*) - within the life of the cookie. Just remember that $q->cookie only contains cookies sent by the browser as part of that particular http request! Hope that clears things up a little :) cLive ;-)
|
|
||||||||||||||||||