|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Generate data entry and reporting .NET Web apps in minutes, straight from your database. Read our FREE whitepaper “Build Web 2.0 Applications Without Hand-Coding” Download now! |
|
#1
|
|||
|
|||
|
Hi!
I send cookie to browser: ... print "Set-Cookie: number=1; $exp; $domain\n"; ... Then I read cookie: ... print "Content-type: text/html\n\n"; print $ENV{'HTTP_COOKIE'}; ... When I close browser and open it again, $ENV{'HTTP_COOKIE'} isn't defined. Why? Please help. |
|
#2
|
||||
|
||||
|
When setting a cookie, the syntax should be:
Code:
"Set-Cookie: id=$value; path=$cookiepath; expires=Mon, 16-Mar-2020 00:00:00 GMT\n", The expire date, adjust as needed and must be in this format. If your using Perl, have your tried using the CGI.pm module to handle your cookies, alot simpler! ![]() Mickalo [Edited by mickalo on 02-24-2001 at 07:35 AM]
__________________
Thunder Rain Internet Publishing Custom Programming & Database development Providing Personal/Business Internet Solutions that work! |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > Using cookies in Perl |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|