note 72357 added to function.header
| From: | Tom at osu1 dot php dot net | Date: | Mon, 15 Jan 2007 19:58:58 +0000 |
| Subject: | note 72357 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-121751@lists.php.net to get a copy of this message | ||
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.
----
Server IP: 216.194.113.175
Probable Submitter: 71.227.217.96
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit -- https://master.php.net/note/edit/72357
Del: integrated -- https://master.php.net/note/delete/72357/integrated
Del: useless -- https://master.php.net/note/delete/72357/useless
Del: bad code -- https://master.php.net/note/delete/72357/bad+code
Del: spam -- https://master.php.net/note/delete/72357/spam
Del: non-english -- https://master.php.net/note/delete/72357/non-english
Del: in docs -- https://master.php.net/note/delete/72357/in+docs
Del: other reasons-- https://master.php.net/note/delete/72357
Reject -- https://master.php.net/note/reject/72357
Search -- https://master.php.net/manage/user-notes.php