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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with cookies

Status
Not open for further replies.

goodtalka

Programmer
Jun 11, 2002
12
IN
hi,
I have a problem with cookies in perl. I have created the cookie in the following way :

-----------------
my $cgi = new CGI;
my $cookie= $cgi->cookie(-name=>"usrid",
-value=>"usname",
-path=>"/cgi-bin/");

----------------

I want to know how to 'change the value' and 'to destroy' this cookie in any other script that I execute in the same session.
 
to set the cookie to something else simple set the cookie again. it will overright the cookie. to get rid of a cookie just set the timeout to the current time. so once it gets the cookie the expiration is over and it will die.

This should work I haven't messed with cookies in a long while.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top