i have
i am setting this cokie properly, but is that the right way to get it and check it against a file that i have usernames and ids stored it? it doesn't seem to work...Code:use CGI; $html = new CGI; my $loggedIn = 0; my $errMessage; my $madeCookie; %cookie = $html->cookie('StreamIt'); if(exists $cookie{name}){ open(SESSION_READ,"<sesIDs.dat"); my $sessions = <SESSION_READ>; chomp $sessions; my %sesHash = split /\|/, $sessions; if($sesHash{$cookie{"username"}} eq $cookie{"id"}){ print $html->header(); print $cookie{"id"}, "DLKJF"; $loggedIn = 1; %cookieHash = ("username",$cookie{"username"},"id",$cookie{"id"}); $madeCookie = $html->cookie(-name=>"StreamIt",-value=>\%cookieHash,-expires=>'+1h'); } close SESSION_READ; }
this sesID's file contains stuff like
Selina|8b88ad37b5153702fdfe13b5c41f8993|Alfred|ceec0cdc17b0e17c4135a1ba0c7b5ea0
any ideas what i'm doing wrong??
--770


Reply With Quote