What is the equivalent of ASP's RESPONSE.REDIRECT object?

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

Post Reply
jjuliano
Forum Newbie
Posts: 1
Joined: Sat Nov 23, 2002 9:22 am
Contact:

What is the equivalent of ASP's RESPONSE.REDIRECT object?

Post by jjuliano »

What is the equivalent of ASP's RESPONSE.REDIRECT object in PHP? Please help!

Thanks.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

http://www.php.net/manual/en/function.header.php
The second special case is the "Location:" header. Not only does it send this header back to the browser, but it also returns a REDIRECT (302) status code to the browser unless some 3xx status code has already been set.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Be sure to read this - viewtopic.php?t=1157 - as it explains a common pitfall of using the header() function.

Mac
Post Reply