On Sun, Mar 03, 2002 at 07:20:35AM -0500, [EMAIL PROTECTED] wrote:
> Could someone tell me why this doesn't retrieve my cookie?
> use CGI param, header,cookie;
> print header();
> print header(-cookie=>'MY_COOKIE');

header() is for generating an http header, not for reading from it.
print cookie('MY_COOKIE') instead.

Quoting the CGI manpage:

        To retrieve a cookie, request it by name by calling
        cookie() method without the -value parameter:

        use CGI;
        $query = new CGI;
        %answers = $query->cookie(-name=>'answers');
        # $query->cookie('answers') will work too!
        
-- 
Johannes Franken
 
Professional unix/network development
mailto:[EMAIL PROTECTED]
http://www.jfranken.de/

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to