Go4Expert (http://www.go4expert.com/)
-   Perl (http://www.go4expert.com/forums/perl/)
-   -   cookie problem (http://www.go4expert.com/forums/cookie-problem-t3937/)

bhavin12300 19Apr2007 14:28

cookie problem
hi i have created one cgi scrips in which i am setting the value of the cookie but i am not able to retrieve the cookie value in the same program and able to access the same coolie from other program.
following is my code
please suggest me the correction in this

#! /usr/bin/perl
use DBI;
use CGI;

$query = new CGI;

$cookie = $query->cookie(-name=>'MY_COOKIE',
print $query->header(-cookie=>$cookie);

$query2 = new CGI;
print $query2->header;

$theCookie = $query2->cookie('MY_COOKIE');
print $theCookie;

All times are GMT +5.5. The time now is 12:28.