r_mehmed has asked for the wisdom of the Perl Monks concerning the following question:
any ideas appreciated.cheerssub login { if (exists $row[0], $password eq $row[1]) { $cookie = $q->cookie(-name=>"username" ) || set_cookie($q); $cookie1 = $q->cookie(-name=>"userpass" ) || set_cookie_pass($q); print $q->header(-type=>"text/html"), $q->start_html(-title=>" | Admin | ", -style=>{-src=>"../. +./mycss.css"}), $q->end_html; } else { error_page(); exit; } } ################################################# sub set_cookie { my $q = shift; my $username_sub= $q->param('username'); $cookie = $q->cookie( -name=>"username", -value=>$username_sub, -expires=>"+30m"); } sub set_cookie_pass { my $q = shift; my $password_sub = $q->param('password'); $cookie1 = $q->cookie(-name=>"password", -value=>$password_sub, -expires=>"+30m"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble with cookies
by pfaut (Priest) on Mar 07, 2003 at 02:17 UTC | |
|
Re: Trouble with cookies
by blokhead (Monsignor) on Mar 07, 2003 at 02:21 UTC |