PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
pixelwraith
Forum Newbie
Posts: 18 Joined: Wed Apr 14, 2004 11:01 am
Post
by pixelwraith » Sun May 30, 2004 2:54 am
is it possible to redirect other than in the header?
eg if i have code like:
if (....)
{ redirect}
else
{}
PrObLeM
Forum Contributor
Posts: 418 Joined: Sun Mar 07, 2004 2:30 pm
Location: Mesa, AZ
Contact:
Post
by PrObLeM » Sun May 30, 2004 3:06 am
header('Location: file.php');
mudkicker
Forum Contributor
Posts: 479 Joined: Wed Jul 09, 2003 6:11 pm
Location: Istanbul, TR
Contact:
Post
by mudkicker » Sun May 30, 2004 6:31 am
you can use meta tags for redirect as well, but header is of source better..
dull1554
Forum Regular
Posts: 680 Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W
Post
by dull1554 » Sun May 30, 2004 10:11 am
if you want to use header redirect after output, you can use output buffering ob_start()
tim
DevNet Resident
Posts: 1165 Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio
Post
by tim » Sun May 30, 2004 8:29 pm
you can do a location.replace via JS
works just as good and you dont have to tamper with the buffering.