Read cookie value : Cookie « CGI « Perl






Read cookie value

    

#!c:/perl/bin

use CGI;
$q1 = new CGI;

print $q1->header;
$cookie1 = $q1->cookie('FIRST_NAME');

if($cookie1)
{
   print $cookie1;
}
else
{
  print "No such Cookie!";
}

   
    
    
    
  








Related examples in the same category

1.A Simple Cookie Example
2.A Simple Cookie Example Using the CGI Module
3.Retrieving Cookies
4.Setting Cookie Expiration Without Using the CGI Module
5.Setting Cookie Expiration Using the CGI Module
6.Sending Multiple Cookies Using CGI.pm
7.Retrieving Multiple Cookies
8.Create cookie
9.Cookies and Session Tracking
10.Session tracking in our CGI scripts
11.Program to read cookies from the client's computer
12.Time Period Abbreviations for the CGI Module's Header and Cookie Functions