List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:September 16 2000 11:36pm
Subject:Re: Cookie checking in Perl - Fixed
View as plain text  
I got it, there must have been a problem with the package so I
changed a few items in the and it works now.

Thanks and sorry to bother all of you.


Douglas Brantz wrote:

> I know this isn't the list to post this type of question, but thought
> someone here would know the answer.
> I'm working in Perl and with CGI::Cookie;  and would like to know why
> this code won't work?
> #use strict;
> use diagnostics;
> use CGI;
> use DBI;
> use CGI::Cookie;
> use acsvars qw(%config);
> print $query->header("text/html");
> if ($ENV{'HTTP_COOKIE'}) {
> #
> #---------------- Cookie Check ----------------
> %cookies = fetch CGI::Cookie;
> $USERID = $cookies{$config{'cname'}}->value;
> if ($USERID ne "$config{'cvalue'}"){
> #print "Content-Type: text/html\n\n";
> print  $query->start_html  (-title=>'Cookie
> Check',-link=>'blue',-alink=>'blue',-vlink=>'blue');
> print "<html>";
> print "<head>";
> print "sorry you need to login first.";
> If the cookie has expired or if there is no cookie it should go to the
> what if statement and it works on another script but not this one?  I
> just get a document contains no data error message?  It actually works
> if you login as admin and the cookie is checked and everything is ok,
> but after it expires it complains with the document contains no data?
> It seems that the cookie value is not returned almost like the name and
> value of the cookie are gone and $USERID = nothing?  but I would think
> that the code would work?
> Thanks,
> Douglas
> --
> ---------------------------------------------------------------------
> Please check "" before
> posting. To request this thread, e-mail mysql-thread50823@stripped
> To unsubscribe, send a message to:
>     <>
> If you have a broken mail client that cannot send a message to
> the above address (Microsoft Outlook), you can use:

Cookie checking in PerlDouglas Brantz17 Sep
  • Re: Cookie checking in Perl - FixedDouglas Brantz17 Sep