Thanx again, here's my code the file is named: http://cgi.tripod.com/aine_canby/cgi-bin/yop.cgi ------------------------------------------------------- Code ------------------------------------------------------- #!/usr/local/bin/perl -w use strict; use CGI; my $query = new CGI; my $cookie_out = $query->cookie( -name=>"MY_NAME", -value=>"Barry Griffin", -expires=>'+24h', -path=>'/aine_canby/cgi-bin', -domain=>'cgi.tripod.com', -secure=>0 ); print $query->header(-cookie=>$cookie_out); print $query->start_html("Cookie Test"); # DEBUG TO SCREEN print $query->p; print $query->header(-cookie=>$cookie_out); print $query->p; my $cookie_in = $query->cookie("MY_NAME"); if($cookie_in) { print $cookie_in; } else { print "Can't find the cookie"; } print $query->p; print $query->end_html; ---------------------------------------------------------- BROWSER DISPLAYS ---------------------------------------------------------- Set-cookie: MY_NAME=Barry%20Griffin; domain=cgi.tripod.com; path=/aine +_canby/cgi-bin; expires=Monday, 27-Aug-2001 22:50:49 GMT Content-type +: text/html Can't find the cookie ----------------------------------------------------------- Cookie Contains - MY_NAME Barry%20Griffin cgi.tripod.com/aine_canby/cgi-bin 0 782699264 29437766 42193056 29437564 *

In reply to $ENV{'HTTP_COOKIE'} keeps returning null even though ive created the cookie - thanks for the quick reply by Baz
in thread $ENV{'HTTP_COOKIE'} keep returning null even though ive created the cookie by Baz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.