Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re^3: CGI Cookie creation problem

by muba (Priest)
on Jun 19, 2012 at 14:49 UTC ( #977088=note: print w/replies, xml ) Need Help??

in reply to Re^2: CGI Cookie creation problem
in thread CGI Cookie creation problem

Are you sure? When I run this script from the command line it gives me pretty much what you'd expect:

G:\>type use CGI (); #Create Cookie $mc_cookie_domain_name = ""; $mc_path_script = "/"; $mc_cookie_expiration_time = "+2h"; $mc_cookie_name = "Sample_Cookie"; #$mc_cookie_value = $mc_form_member_name; $mc_cookie_value = "Logged In"; my $cgi = CGI->new(); my $cookie = $cgi->cookie(-name => $mc_cookie_name, -value => $mc_cook +ie_value, -expires => $mc_cookie_expiration_time, -domain => $mc_cookie_domain_n +ame); print $cgi->redirect(-url => ' +ccount_2.p l', -cookie => $cookie); #End of Create Cookie G:\>perl Status: 302 Found Set-Cookie: Sample_Cookie=Logged%20In;; path=/; exp +ires=Tue, 19-Jun-2012 16:45:45 GMT Date: Tue, 19 Jun 2012 14:45:45 GMT Location: G:\>

Replies are listed 'Best First'.
Re^4: CGI Cookie creation problem
by Nicko2004 (Initiate) on Jun 20, 2012 at 10:11 UTC

    Hello Muba, Thank you for your reply. Yes, I am absolutely positive no cookie was created when I ran the script using internet explorer from the website. is not the website by the way I am scratching my head trying to work out why as I have used this script without problems in the past, albeit without the earlier mistakes I missed out on. Any thoughts as to why? IT appears to work but no cookie is created. Thanks in advance.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://977088]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2016-10-23 16:56 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (301 votes). Check out past polls.