Re: creating a 401
| From: | hennink at patrijs dot max dot nl | Date: | Fri, 22 Dec 2000 09:18:03 +0000 |
| Subject: | Re: creating a 401 | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-31553@lists.php.net to get a copy of this message | ||
Well,
if I'm trying to output your code it doesn't show up.
Header("HTTP/1.0 403 Forbidden");
What else can I do????
Here is the complete code:
if($user->checkPassword($password)) {
echo "LOGIN SUCCEEDED";
} else {
Header("HTTP/1.0 403 Forbidden");
}
and yes checkpassword returns true if true and false ......
Tijmen
On Thu, 21 Dec 2000, Ignacio Vazquez-Abrams wrote:
> On Thu, 21 Dec 2000, Systeembeheer Max.nl wrote:
>
> > Hi,
> >
> > How can I create the default errormessage for apache when a user doesn't
> > give the right password.
> > According to the manual it has to be
> > Header("HTTP/1.0 401 Unauthorized");
> > but this give you a loginscreen instead of some errormessage.
> >
>
> The status code you want is "403 Forbidden", not 401.
>
>
--
Customer: I'm running Windows '98
Tech: Yes.
Customer: My computer isn't working now.
Tech: Yes, you said that.