RE: [PHP] HTTP header question.

From: Date: Mon, 30 Jul 2001 04:07:37 +0000
Subject: RE: [PHP] HTTP header question.
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-60149@lists.php.net to get a copy of this message
On 30-Jul-2001 Ben Bleything wrote: > All I want to do is output "Authentication failed" above the form if > they type in invalid credentials. I want to do it by passing a header > that contains the same information as if there were a form submitted > that contained a field name "failed" and value "true". Aside from this > one application, I can think of many other places where this would be > valuable. > > Am I being unclear? It seems that my question was not understood. > Please let me know so I can try to re-explain. > <?php $lock="tmp/REMOTE_ADDR"; if (isset ($login)) { if (checkuser($login, $passwd)) { unlink($lock); Header('Location: /goodguy.php'); } else { touch($lock); Header('Location: '. $PHP_SELF); } } if (file_exists($lock)) echo 'Authentication failed', '<br>' unlink($lock); // do yer form '<form method="POST" ACTION="' .$PHP_SELF .'"'; <input text name=login > <input text name=passwd > </form> Regards, -- Don Read dread@texas.net -- It's always darkest before the dawn. So if you are going to steal the neighbor's newspaper, that's the time to do it.

« previous php.general (#60149) next »