note 72357 deleted from function.header by betz
| From: | betz@php.net | Date: | Mon, 15 Jan 2007 22:23:42 +0000 |
| Subject: | note 72357 deleted from function.header by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121754@lists.php.net to get a copy of this message | ||
Note Submitter: Tom
----
I have always used
'header("Location: http://www.foo.com");'
to redirect the browser but have found that it is MUCH more effective to use a javascript function
such as
echo '<script language="javascript">';
echo 'window.location="http://www.foo.com"';
echo '</script>';
it isn't perfect, but it works all the time rather than having an error that you have already
echo'ed information and the header cannot be sent etc etc.