Basic HTML version of Foils prepared 2 Sept 1997

Foil 33 Retrieving a cookie

From CGI Programming with Advanced Topics Jackson State University Mississippi -- Fall Semester 97. by Nancy McCracken *

1 If any request for a document or script satisfies the validity requirements, then an environment variable HTTP_COOKIE is set to have all the cookie values.
2 Cookies are key, value pairs and are encoded just like all other fields, EXCEPT that they are separated by ; (instead of &).
3 in Perl: $ENV{'HTTP_COOKIE'}
4 could have the value: full+name=Max+Planck;Occupation=physicist
5 This can be decoded in a similar fashion as the standard ReadParse subroutine, except that you must split the fields on ";".

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Tue Sep 2 1997