note 37128 added to function.header

From: Date: Tue, 04 Nov 2003 10:17:32 +0000
Subject: note 37128 added to function.header
Groups: php.notes 
Request: Send a blank email to php-notes+get-59853@lists.php.net to get a copy of this message
This is a heads-up not just for php, but for any method of creating a 302 redirect. Mac IE 5.1.4 (osx) has a serious bug when it comes to the 302. Say you have a form post page A with action pointing to a submit page B, and the submit page B processes and sends a 302 redirect back to the form page A. All works fine with that part. Now hit refresh while on page A, and the last form POST is suddenly delivered to page A! This can be a very confusing bug to deal with, depending on how your code handles incoming post data. It could also be potentially very dangerous in terms of data loss, if it occurs within database administration pages (where I ran into it). What you may want to do is plan your site so that the form page itself never needs to read POST data, and then ignore all POST data. Either that, or in the location url from your header function add a query argument such as "nopost=1" which, when present, indicates to your page A code to ignore the POST data. I've tested with Firebird Mac/PC, and IE6 on PC, and those browsers do not exhibit this behaviour. ---- Manual Page -- http://www.php.net/manual/en/function.header.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37128 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37128&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37128&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59853) next »