Date: 05/01/01
- Next message: Dennis Gearon: "[phplib] own table names, structures"
- Previous message: Tom Hensel: "Re: [phplib] PHPLIB Chat chanel?"
- Maybe in reply to: Ricardo Sardano Guanciale: "[phplib] I need relogin ? (part 2)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That is how the manual recommends you do it, but personally, I prefer to
link to another page like so:
<a href="logoff.php">Logout</a><BR>
and then the logoff.php page would look like:
my_page_open();
$auth->logout();
my_page_close();
header ( "location: index.php" ); <-- or whatever page you linked from
exit;
It's essentially the same thing, but I just think this isolates the logoff
code and makes things a little cleaner.
Brian Popp
bpopp at midsouth dot rr dot com
www.bpopp.net
-----Original Message-----
From: Klaus Seidenfaden [mailto:ks <email protected>]
Sent: Tuesday, May 01, 2001 3:44 PM
To: phplib <email protected>
Subject: Sv: [phplib] I need relogin ? (part 2)
Ricardo Sardano Guanciale wrote:
>Why after I logged in with user and password when I called another page
>protected by auth class it's page show me login form again?
Because of this line:
<a href="test1.php3<?php $auth->logout() ?>">Logout</a><BR>
Can you see it? You don't have to click the link - you are already logged
out.
Try this instead (or similar):
<a href="test1.php3?logout=true">Logout</a><BR>
And then put code like
<?php if($logout) {auth->logout(); page_close(); exit; ?>
early in the script.
-- Klaus.
P.S. You mention $PHPSELF in test1. It should be $PHP_SELF.
P.P.S. I think the first copy of this reply got mailed to you, not the list.
Or maybe it didn't. In both cases, sorry for the inconvenience.
---------------------------------------------------------------------
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>
- Next message: Dennis Gearon: "[phplib] own table names, structures"
- Previous message: Tom Hensel: "Re: [phplib] PHPLIB Chat chanel?"
- Maybe in reply to: Ricardo Sardano Guanciale: "[phplib] I need relogin ? (part 2)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

