Perl: the Markov chain saw | |
PerlMonks |
Re^2: SSI and *reading* a cookie onlyby jfrm (Monk) |
on Jun 17, 2005 at 20:43 UTC ( [id://467884]=note: print w/replies, xml ) | Need Help?? |
Thank you for answering. I don't think this works as far as I can see, though. Perhaps I'm being dense. Keeping it simple, my SSI script uses the cookie to lookup a person's session file and thus determine if a person is in the EU, US or UK. If the person is from the US, it displays a US flag and a price in US$, if EU, an EU flag and a price in Euros etc. But since it can't get at the cookie, it can't get the person's session file and so cannot determine what to display. I have already set up a test SSI which calls a virtual in the way you suggest. It works but doesn't do anything except show the current ENV variables. I pasted in the code exactly as you have it but without the header and start_html as I already had these. It didn't show anything and a print of @names showed that @names was empty. I don't use CGI module so am not too familiar but surely if a perl script called by SSI virtual finds the HTTP_COOKIE environment variable undefined, surely the CGI module will find the same thing when calling cgi->cookie(), won't it? thanks, P&DM.
In Section
Seekers of Perl Wisdom
|
|