Um...help?File A (login script): ... $c = $query->cookie(-name=>'ID', -value=>( username=>$username, password=>$password ) ); print $query->redirect(-location=>$goodurl,-cookie=>$c); exit 0; File B (page viewer): %cookies = fetch CGI::Cookie; if(%cookies ne undef) { if($cookies{'ID'} ne undef) { my %hash = $cookies{'ID'}->value; $username = $hash{'username'}; $password = $hash{'password'}; } else { # Cry, because this is where I keep ending up. # If I don't have check for the undef, # $cookies{'ID'}->value actually kills the script... } }
In reply to Crashing Cookie Code by quill
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |