WHY isn't my freaking cookie being set?!!?!?! :-(

 
Post new topic   Reply to topic    Aprelium Forum Index -> Perl
View previous topic :: View next topic  
Author Message
derek
-


Joined: 10 Oct 2003
Posts: 14

PostPosted: Sun Dec 28, 2003 3:47 am    Post subject: WHY isn't my freaking cookie being set?!!?!?! :-( Reply with quote

here is my code for setting a cookie...WHY is it not being set? i have done exactly what all the tutorials i find say to do...please help me someone!

CODE:
sub doCookieSet
{
$u="$FORM{'user'}";
$p="$FORM{'password'}";
use Digest::MD5 qw(md5_hex);
$md5pwd=md5_hex($p);
$finalcookie="user=$u;pass=$md5pwd";

use CGI;
$q=new CGI;
$cookie=$q->cookie(-name=>'derek',
-value=>$finalcookie
-expires=>'+3m');
print $q->header(-cookie=>$cookie);

&doCookieReturn;
}
#----------------------------------------------------------------------
sub doCookieReturn
{
use CGI;
$q=new CGI;
$thecookie=$q->cookie("derek");
if ($thecookie){print "$thecookie";}
else{print "Cookie does not exist";}
}
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Perl All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group