Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > response.redirect in php

response.redirect in php
Thread Tools
Fresh-Faced Recruit
Join Date: May 2002
Location: Ft Lauderdale
Status: Offline
Reply With Quote
Jun 30, 2002, 03:13 PM
 
I have scoured my php book looking for an equivalent to asp's Response.redirect function. Does anyone know this offhand? TIA

Edit: I found it, for those interested Header("Location: URL");

<small>[ 06-30-2002, 10:43 PM: Message edited by: Vasudevelopa ]</small>
     
Fresh-Faced Recruit
Join Date: Apr 2002
Location: PA
Status: Offline
Reply With Quote
Jul 3, 2002, 03:27 PM
 
Just a suggestion: when you do a redirect, make sure to put exit; after the header() function. Other wise even though the browser will immediately redirect the user, the script will still process in the background.
     
Fresh-Faced Recruit
Join Date: May 2002
Location: Ft Lauderdale
Status: Offline
Reply With Quote
Jul 3, 2002, 04:39 PM
 
Thanks, I wasn't aware of that.
     
Mac Elite
Join Date: Mar 2001
Status: Offline
Reply With Quote
Jul 4, 2002, 11:28 AM
 
Yeah, basically response.redirect (or Response.Redirect if you're using c# <img border="0" title="" alt="[Wink]" src="wink.gif" /> ) sends a 301 error (page temporarily moved, i believe) to the client. I think you can do the exact same thing if you output a meta refresh with 0 seconds.

-Raman
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 10:33 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2