wolverina has asked for the wisdom of the Perl Monks concerning the following question:
is not seen by this perl script? The cookie shows on my hard drive so i know it's being created.<script language=javascript type="text/javascript"> <!-- function SetCookie(username, value, expires, path, domain) { document.cookie = username + "=" + escape(value) + ((expires == null) ? "" : "; expires=" + expires.toGMTString()) + ((path == null) ? "" : "; path=" + path) + ((domain == null) ? "" : "; domain=" + domain); } var expiration = new Date(); expiration.setTime(expiration.getTime() + 60000); SetCookie('username', 'Peter', expiration); // --> </script>
-Lisa.#!/usr/local/bin/perl use CGI; $q = new CGI; print $q->header; $cookie_in = $q->cookie("username"); if($cookie_in) { print $cookie_in; } else { print "Can't find cookie\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: javascript.. perl.. cookie
by antirice (Priest) on Oct 31, 2003 at 23:45 UTC | |
by wolverina (Beadle) on Nov 01, 2003 at 00:29 UTC | |
by antirice (Priest) on Nov 01, 2003 at 01:15 UTC | |
by wolverina (Beadle) on Nov 01, 2003 at 01:26 UTC | |
|
Re: javascript.. perl.. cookie
by injunjoel (Priest) on Nov 01, 2003 at 00:59 UTC | |
|
Re: javascript.. perl.. cookie
by shenme (Priest) on Oct 31, 2003 at 23:08 UTC | |
|
Re: javascript.. perl.. cookie
by Cody Pendant (Prior) on Nov 01, 2003 at 04:30 UTC | |
|
Re: javascript.. perl.. cookie
by Anonymous Monk on Nov 01, 2003 at 01:16 UTC |