User login

Comments

Yeah, I always thought that was a bit counter-intuitive, that you’d have to die(); after sending a Location header (I mean, who wouldn’t want to?)—but since the header() function can be used for things you wouldn’t want to follow with die(), the only alternative would be a modification to PHP itself: header() would have to check if it’s doing a redirect or not, and automatically die(); if it is.

Or they could just make a separate redirect() function for sending that header, like ASP.NET has Response.Redirect().

When I read the title of this post, I assumed it was going to be about hacking Windows admin accounts. smile

There is a good reason for it to not die. If I wanted to make a pretty error page for broken web browsers (ie. very old ones) then I could generate that after the header() function call.

Most of the time, the most extravagant that I do is a message that says “You need to go /here/ instead.”

Hacking Windows administrative accounts is old hat. wink

Oh, and I do have the NoRedirect extension installed on Firefox to use while debugging. It can be useful to see output during a “Location” redirect.

[quote=Chris]If I wanted to make a pretty error page for broken web browsers

That’s interesting; I didn’t know there were browsers that don’t use Location headers properly.

[quote=Chris]Hacking Windows administrative accounts is old hat. wink

I know, I still thought that’s what it was going to be about. smile

Add new comment