Re: GET / POST strange error
| From: | Richard Lynch | Date: | Sat, 25 Aug 2001 01:16:15 +0000 |
| Subject: | Re: GET / POST strange error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-64380@lists.php.net to get a copy of this message | ||
What the heck is "2"?...
And why is "2" the "good" number for your authentication to return for
successful login?...
I'm guessing that you are mis-interpreting the result codes for
$authlib->login()...
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Mike <mike-nospam@blueroot.net>
Newsgroups: php.general
To: <php-general@lists.php.net>
Sent: Friday, August 24, 2001 9:17 AM
Subject: GET / POST strange error
> i have written a login page for a members area on my site - the code is as
> follows...
>
> <?
> require_once("backend.php");
>
> if (!$userid || !$password) {
>
> include("loginform.php");
> exit;
> }
> else {
> $login = $authlib->login($userid, $password);
>
> if ($login != 2) {
> $error = $login;
> include("loginform.php");
> exit;
> }
> else {
> include("index.php");
> }
> }
> ?>
>
> it uses authlib to authorise the user and then include a different pasge
if
> they are logged in...fairly simple so far..
>
> approx 50% of the time the user cannot log in straight away... the page
just
> reloads and you get the blank entry fields again.
>
> The logs show the page being posted and then get
>
> 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "POST
/cand/members/login.php
> HTTP/1.1" 302 1792
> 213.165.1.171 - - [24/Aug/2001:15:05:36 +0100] "GET
/cand/members/login.php
> HTTP/1.1" 200 1094
>
> i am using apache 1.3.19 and php 4.0.4 on redhat 7
>
> I have had this problem reported on another form page as well...
>
>