On Tue, 25 Sep 2001, Christian Azambuja Pagot wrote:
> No, I didnīt forget the "\n"s in the end of each header...
>
> print "Set-Cookie: logged=0\n";
> ....
> .... data base instructions to check the login data ....
> ....
> if (LOGIN_FAILS)
> {
> print "Set-Cookie: logged=1\n";
> print "Location: http://www.wherever1.com\n";
> }
> else
> {
> print "Location: http://www.wherever2.com\n";
> }
Looking at your code again, why are you setting the cookie twice?
#
# database hoohah
#
if (LOGIN_FAILS) {
print "Set-Cookie: logged=1\n";
print "Location: http://www.wherever1.com\n";
} else {
print "Set-Cookie: logged=0\n";
print "Location: http://www.wherever2.com\n";
}
Unlike the code you posted before, now you're actually using both branches
of the if-block. (My code doesn't change this, you did it yourself.)
The one change I'd make is to move the first cookie statement into the
if-block, as that's where it seems most relevant.
Otherwise, this code looks okay.
Does it still not work? If not, what's going wrong?
--
Chris Devers [EMAIL PROTECTED]
_______________________________________________
Perl-Win32-Web mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-web