Jump to content

Archived

This topic is now archived and is closed to further replies.

joecooper

using header() to redirect?

Recommended Posts

i need to have the code direct someone to badlogin.php

i not sure on howto use header to do this
Thanks!

Share this post


Link to post
Share on other sites
[code]header("Location: badlogin.php");[/code]

It's in the online manual as well ... and it will not work if you have ANY output to the browser before that statement.

Share this post


Link to post
Share on other sites
[!--quoteo(post=380034:date=Jun 4 2006, 05:31 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Jun 4 2006, 05:31 PM) [snapback]380034[/snapback][/div][div class=\'quotemain\'][!--quotec--]
how can i do it WITH output to the browser before that statement?
[/quote]

You can always call it on a php script away from the visual page. This way there will be no output sent and it will redirect where ever you have to go.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.