Hi all, I want to send other cookies along with the session; Right now i am printing the session cookie in header by: but if i print another cookie like it doesnt create the cookie $cookie13 please let me know how to do it Thankyou... Rakesh
Hi Rakish, Unfortunately we can't send mutiple cookies using CGI::Session's header method, for sending multiple cookies we need a different approach. Checkout the code snippet below. Code: $session = new CGI::Session(); $sessionCookie = $q->cookie(-name=>$session->name,-value=>$session->id); #session cookie $cookie1 = $q->cookie(-name=>'deepz',-value=>'deepx_cookie'); #cookie 1 $cookie2 = $q->cookie(-name=>'cookie2',-value=>'deepx_cookie2'); #cookie 2 print $q->header(-location=>'index.pl',-cookie=>[$cookie1,$sessionCookie,$cookie2]); #send as many cookies as you like this way I hope this solves your problem.