Jump to content


Photo

using header() to redirect?


  • Please log in to reply
3 replies to this topic

#1 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 04 June 2006 - 09:08 PM

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

i not sure on howto use header to do this
Thanks!
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 04 June 2006 - 09:20 PM

header("Location: badlogin.php");

It's in the online manual as well ... and it will not work if you have ANY output to the browser before that statement.
Legend has it that reading the manual never killed anyone.
My site

#3 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 04 June 2006 - 09:31 PM

how can i do it WITH output to the browser before that statement?
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#4 homchz

homchz
  • Members
  • PipPipPip
  • Advanced Member
  • 93 posts
  • LocationLee, New Hampshire

Posted 04 June 2006 - 09:46 PM

[!--quoteo(post=380034:date=Jun 4 2006, 05:31 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Jun 4 2006, 05:31 PM) View Post[/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.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users