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 [EMAIL PROTECTED]
-- 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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]