How do I detect if it is the first time a user sees a page ?
Posted: Thu Sep 05, 2002 3:42 pm
Hi.
I´m having problems with authentication.
Suppose page A calls page B and B calls C. Like this.
A ==> B ==> C
In page B, I have to ask the user for his username and pw, so that C will show him his data. Every time user passes though page B, I have to ask for his username and password. This way, I can switch between users without leaving the environment.
I have tried this:
if (! $flag || !isset ($PHP_AUTH_USER) || ! isset ($PHP_AUTH_USER))
{
header('WWW-Authenticate: Basic realm="Here"');
session_register ("flag");
$flag = false;
}
Did not work. Maybe my session variables are not correctly registered ?
Thanks
Leonel
I´m having problems with authentication.
Suppose page A calls page B and B calls C. Like this.
A ==> B ==> C
In page B, I have to ask the user for his username and pw, so that C will show him his data. Every time user passes though page B, I have to ask for his username and password. This way, I can switch between users without leaving the environment.
I have tried this:
if (! $flag || !isset ($PHP_AUTH_USER) || ! isset ($PHP_AUTH_USER))
{
header('WWW-Authenticate: Basic realm="Here"');
session_register ("flag");
$flag = false;
}
Did not work. Maybe my session variables are not correctly registered ?
Thanks
Leonel