Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wrote script to read session info from cookie or create new if none...

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034

this script originally was working, but i don't know why it stopped...

is this correct syntax?

***
use CGI::Session;
my $cgi = new CGI;
my $sid = $cgi->cookie("CGISESSID") || undef;
my $session = new CGI::Session(undef, $sid, {Directory=>'/tmp'});
my $cookie = $cgi->cookie(CGISESSID => $session->id );
***

i don't understand where on the users computer the cookie if placed...

what i want it to do is create a new user session if the cookie isn't there, or use the existing if cookie is there.

any help/suggestions?

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top