In the spirit of KISS
use strict; use CGI; my $q = new CGI; # Set a SESSION persistant cookie. (deleted when browser is closed) my $cookie = "name=value;path=\"; print $q->header(-cookie => $cookie); # The cookie value should be some sort of code (encrypted or random), +linked # to a database (or file) variable for validation. # Read a cookie. And don't forget to verify that it's what you expect. my $cookie_value = $q->cookie('name'); if ($cookie_value !~ /^\w{23}$/) { print "not a valid cookie\n" } # Clear a cookie. # Here you can re-write the cookie with a 'past' date, or simply null +it out # Also clear out the database (or file) variable. my $cookie = "name=;path=\"; print $q->header(-cookie => $cookie);
Also take a look a this...
stonehenge
In reply to Re: Just Another Question About Sessions And User Management
by nedals
in thread Just Another Question About Sessions And User Management
by muba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |