note 35241 added to function.header
| From: | mail at cariad dot co dot za | Date: | Mon, 25 Aug 2003 09:07:40 +0000 |
| Subject: | note 35241 added to function.header | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55024@lists.php.net to get a copy of this message | ||
I had problems with <?header('Location: newpage.php')?>, where (some) servers seemed
to simply send newpage.php without waiting for the client to request it (it acted more like
include() than a redirect).
So if I started a session on the login page, using cookies to propagate it, when it redirected back
to the site, the client wouldn't send the cookie, so wouldn't appear to be logged-in.
I solved this by adding <?header('Status: 302 Moved Temporarily')?> before the
redirect. That forces the client to make a new request.
----
Manual Page -- http://www.php.net/manual/en/function.header.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35241
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35241&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35241&report=yes