If there are sessions involved, this second method is prefered, because it will give PHP a chance to change the server sessions.

Sessions can be VERY tricky, specially if one expects the changes of a var to reflect immediatly in the session... they won't... and it is prefered that you issue a client-side refresh to force the update. In that respect, ASP session management is much more straightforward... (even is ASP is way inferior in almost everything else...)...

Cheers...
Luis Ferro

Cam Dunstan wrote:

Jack,
here is another quick and dirty function to stick in your library, yet
another way to redirect from anywhere in your script

function redirect($url){
echo "<script>window.location.replace(\"".$url."\")</script>";
}

usage:

blah
blah
redirect("any_url");

exit;




-----Original Message-----
From: Jack Kelly Dobson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 2:43 PM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Redirect browser to another URL?


Hello,

Anyone know how to have a script re-direct the browser to a URL cleanly?






---
[This E-mail scanned for viruses by Declude Virus]


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to