In your conditional loop for checking the PW, why don't you just use a Reponse
redirect.
if ( defined $cookie ) {
print $q->redirect("/gamepage.htm");
} else {
print "Location: /index.htm\n\n";
}
untested.
-----Original Message-----
From: "Andre` Niel Cameron"<[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Sat Nov 17 10:57:41 PST 2001
Subject: Cookie Help PLEASE!
>Ok, I finaly joined a perl list as I have been banging hy head against the
>wall for 3 days trying to get this to work! I would really appreciate any
>help:) Heres is the problem:
>
>I have a script that after you "Login" it should give you a cookie and then
>load the game start page. Well problem is it gives the cookie but then does
>not load the page! I am using CGI.pm for this as cookie-lib did not work
>overly well. Here is my code(Don't laugh)
>
>############################################################################
>########
>#Do Player Login
>############################################################################
>########
>
>if ($ENV{'QUERY_STRING'} eq "Login") {
>
> CGI::ReadParse(*form);
> $password= $form{'password'};
> $username= $form{'username'};
>
> $file= "data/$username.db";
> open (USR, $file) || die(&Badpw_Page);
> @Read_Password=<USR>;
> close(USR);
> chop(@Read_Password);
> if($Read_Password[0] eq $password) {
> print &LoadMyCookie;
> print &GameStart_page;
> exit;
> } else {
> &Badpw_Page;
> exit;
> }
>}
>
>
>############################################################################
>#########
>#Load Cookie
>############################################################################
>#########
>sub LoadMyCookie {
> $bbtdPlayerData = $TheCookie->cookie(-name=>'bbtdplayer', -value=>[thing,
>stuff, t$
> print $TheCookie->header(-cookie=>$bbtdPlayerData);
>exit;
>}
>
>
>############################################
>#Game Start Page
>############################################
>sub GameStart_page {
>print "Content-type: text/html\n\n";
>print <<EOT;
>Normal frames HTML page here I just did not want to stick it all in:)
>EOT
>exit;
>}
>
>
>You can see it all at http://a.axxs.net username is andre and password is
>password
>Any more info needed email me:)
>
>Regards,
>Andre` C.
>Technical Support
>ԿԬ
>----------------------------------------------------------------------------
>-
>Visit our support manual at http://supportmanual.com/
>
>
>--
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>
___ _
| _ ) ___ ___ | |
| _ \/ _ \/ _ \|_|
|___/\___/\___/(_)
___________________________________________________
GO.com Mail
Get Your Free, Private E-mail at http://mail.go.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]