Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 9:32 am, David BERCOT wrote: >> David BERCOT wrote: >> > I've tried : >> > $_SERVER["PHP_AUTH_USER"] = NULL; >> > without succes... >> >> http://www.php.net/unset >> >> e.g. unset($_SERVER['PHP_AUTH_USER']); >> >> It might, however, be better practice to used an authorisati

Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Lynch
On Fri, January 20, 2006 8:24 am, David BERCOT wrote: > I use this program to force a user to authenticate : > if (!isset($_SERVER["PHP_AUTH_USER"])) { > header("WWW-Authenticate: Basic realm=\"Intranet SDSED\""); > header("HTTP/1.1 401 Unauthorized"); > } > Everything is ok except

Re: [PHP] New identification after an error...

2006-01-20 Thread David BERCOT
> David BERCOT wrote: > > I've tried : > > $_SERVER["PHP_AUTH_USER"] = NULL; > > without succes... > > http://www.php.net/unset > > e.g. unset($_SERVER['PHP_AUTH_USER']); > > It might, however, be better practice to used an authorisation state > variable, or something similar, i.e. > > if (! $a

Re: [PHP] New identification after an error...

2006-01-20 Thread Richard Davey
On 20 Jan 2006, at 14:24, David BERCOT wrote: I use this program to force a user to authenticate : if (!isset($_SERVER["PHP_AUTH_USER"])) { header("WWW-Authenticate: Basic realm=\"Intranet SDSED\""); header("HTTP/1.1 401 Unauthorized"); } Everything is ok except a detail : if the

Re: [PHP] New identification after an error...

2006-01-20 Thread Jochem Maas
David BERCOT wrote: Hi, I use this program to force a user to authenticate : if (!isset($_SERVER["PHP_AUTH_USER"])) { header("WWW-Authenticate: Basic realm=\"Intranet SDSED\""); header("HTTP/1.1 401 Unauthorized"); } Everything is ok except a detail : if the user makes a mistake

Re: [PHP] New identification after an error...

2006-01-20 Thread David Grant
David David BERCOT wrote: > I've tried : > $_SERVER["PHP_AUTH_USER"] = NULL; > without succes... http://www.php.net/unset e.g. unset($_SERVER['PHP_AUTH_USER']); It might, however, be better practice to used an authorisation state variable, or something similar, i.e. if (! $auth) { // H

RE: [PHP] New identification after an error...

2006-01-20 Thread Albert
David BERCOT wrote: > I use this program to force a user to authenticate : > if (!isset($_SERVER["PHP_AUTH_USER"])) { > header("WWW-Authenticate: Basic realm=\"Intranet SDSED\""); > header("HTTP/1.1 401 Unauthorized"); > } > Everything is ok except a detail : if the user makes a mis