RE: [phplib] Logging out From: Philippe Paravicini (philippe <email protected>)
Date: 07/21/00

Make your logout page to read as follows:

<?php
  page_open(array("sess" => "my_session"));
  $auth->logout();
  page_close();
  $redirect = $sess->url("home.php");
  header("Location: $redirect");
?>
make sure that there is absolutely no whitespace or text being outputted
before the 'header' line, or you'll get an error.

pp

> -----Original Message-----
> From: Kartic Krishnamurthy [mailto:kaygee <email protected>]
> Sent: Thursday, July 20, 2000 10:10 AM
> To: Phplib Mailing List
> Subject: [phplib] Logging out
> Importance: High
>
>
> Hi List,
>
> This is a question on logging out a user.
>
> I have a link on my page to logout.php3. Upon clicking on the
> link, the user gets logged out. Then if the user reloads the page,
> it takes him to the login screen (loginform.ihtml) but here is
> where my problem. After logging in using a valid user/pass, the user
> gets logged off again (as the page reloaded was logout.php3).
>
> I do not want that to happen. Instead, if the user reloads the
> logout.php3 (in which state he is not yet authorized), he should get
> the login page but then be taken to the main page of my application.
>
> I also tried another route, which did not work either. After
> doing a $auth->logout(), I used $auth->login_if(1). This way, it
> showed the login box, but would let me login (kept telling that
> the user/pass is invalid!).
>
> Any suggestions?
>
> Thanks
> --Kartic
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: phplib-unsubscribe <email protected>
> For additional commands, e-mail: phplib-help <email protected>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>