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!

how to set multiple cookies during browser session...

Status
Not open for further replies.

spewn

Programmer
May 7, 2001
1,034
i have this code:

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

i want to include this also:

Code:
$cookie = $q->cookie( -name    => "cart_id",
-value   => 12345,
-domain  => ".oreilly.com",
-expires => "+1y",
-path    => "/cgi",
-secure  => 1 );

how do i combine both, and then set using:

Code:
print $cgi->header(-cookie=>$cookie);

thanks fot the help!

- g
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top