note 50588 added to function.header

From: Date: Fri, 04 Mar 2005 03:18:55 +0000
Subject: note 50588 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-85900@lists.php.net to get a copy of this message
A note about the redirection: the way to redirect is: header ("location: target.php"); and it is advised to add, before, a: header ("HTTP/1.0 307 Temporary redirect"); if the redirection is temporary. But if the redirection occurs after a the submission of a post form, your browser will ask you if you want to keep the post data for the redirected page! This could be very annoying in the case the redirection is wanted. The solution to avoid this browser question is not to add any redirection info header at all. So nor the temporary neither the permanent redirect are to use in the case of a redirection after a post (login page for example). ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50588 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50588&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50588&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50588&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50588&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50588&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50588&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85900) next »