not yet, good one to know that. You should post this on to the list so that
people will share this together.
Jack
[EMAIL PROTECTED]
"Love your enemies, it will drive them nuts"
----- Original Message -----
From: Ariunbold Gerelt-Od <[EMAIL PROTECTED]>
To: Jack <[EMAIL PROTECTED]>
Sent: Monday, July 30, 2001 2:34 AM
Subject: Re: log out solution?


> Thanx for your quick reply....
> I've tried the below one and it seemed to work normally.
> But when I installed new Netscape 6.0 as my web browser this is stuff is
> not working.
> And have you tried it on NS6?
>
> Jack wrote:
>
> > Yes indeed, but not a good one. Beside, it appears to be the only
solution
> > though. Someone told me to do this to solve the logout solution:
> > You do this for the login bit:
> > *********************
> > if (!isset($PHP_AUTH_USER) || $unauthorized)
> >
> > $realm = "myrealm_".time();
> > Header("WWW-Authenticate: Basic realm=\"$realm\", stale=FALSE");
> > Header("Status: HTTP/1.0 401 Unauthorized");
> > print "<h1>401 Unauthorized</h1>Unable to authorize you. Please <a
> > href=\"$PHP_SELF\">click here</a> to try again.";
> > exit;
> > }
> > else // if they're not in the database, re-authenticate
> > { // insert query here
> >
> > if username and password are not match
> >

> > header("Location: ".$PHP_SELF."?unauthorized=1");
> > }else{
> > $ID = mysql_result($result,0,0);
> >  print("<meta http-equiv='refresh'
content='1;url=http://yourtargetfile>");
> >  }
> > }
> > *********************
> >
> > And you do this for the log out bit, it won't need user to close the
browser but a user would have to click on the login pop up box once in order
to logout completely.
> >
> > **********************
> > Click <a href=\"login.php?unauthorized=1\">here</a> to log out.";
> > **********************
> > The file login.php is basically your login file, it is to create a new
realm time stamp, I think. If anyone at the list know a better solution
would be good.
> > Jack
> > [EMAIL PROTECTED]
> > "Love your enemies, it will drive them nuts"
> > ----- Original Message -----
> > From: Ariunbold Gerelt-Od <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Monday, July 30, 2001 2:03 AM
> > Subject: Did you find out a solution?
> >
> >
> >
> >>You wrote:
> >>___________________________________________________________________
> >>Hi people
> >>We all know we use PHP_AUTH_USER for login auhenthication, how about =
> >>when we need to logout? Can we just simply link them to someplace else =
> >>or do we need to anything special beside normal link?
> >>cheers
> >>Jack
> >>[EMAIL PROTECTED]
> >>"Love your enemies, it will drive them nuts"
> >>____________________________________________________________________
> >>
> >>
> >
> >>and I have a same problem as you wrote. If you solved it or somebody
> >>helped you ,could you please send me a solution.
> >>Thanx in advance.
> >>
> >>
> >>
> >
> >
> > .
> >
> >
>
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to