> -----Original Message-----
> From: Andre` Niel Cameron [mailto:[EMAIL PROTECTED]]
> Sent: Friday, November 23, 2001 6:34 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Cookie He$$ Continues. Last time please help:)
>
>
> Ok, I have taken most suggestions and ideas and so far The
> script works,
> can set get and read cookies but I can NOT get this thing to
> check if there
> is a cookie and do somethingbased on the results:( It ALWAYS
> thinks there
> is a cookie. BTW pages.pl is just where I stuck all the HTML
> pages there is
> nothing important in there it's all standard HTML. Can
> someone take a crack
> at this please? Thanks ALOT!:)
>
> As always you can see it in action at http://a.axxs.net
>
> HERES CODE:
>
> ...
>
> $cookie{'PlayerData'}= Get_Cookie;
In this statement, Get_Cookie is a "bareword". The literal string
"Get_Cookie" is being assigned to $cookie{PlayerData}; You are *not*
calling your Get_Cookie sub.
Also, you want to assign the cookie to %cookie, not to $cookie{PlayerData},
as far as I can tell.
This statement should probably be:
%cookie = Get_Cookie();
>
> if (exists($cookie{'PlayerData'}))
Since you just assgined something to it, it exists. Fix your
code above, and this will start working.
>
> {&MainFrames_Page;}
>
> else
>
> {&login_page;}
>
> }
"use strict" will catch this kind of error. Both use strict and
use warnings (or -w) are HIGHLY recommended.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]