RE: [PHP] Why do some pages repeat a previous page's action(s) after redirect?

From: Date: Tue, 03 Apr 2007 18:58:24 +0000
Subject: RE: [PHP] Why do some pages repeat a previous page's action(s) after redirect?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-252000@lists.php.net to get a copy of this message
On Tuesday, April 03, 2007 11:44 AM Tijnema ! <mailto:tijnema@gmail.com> said: > This is the only behavior i know of, a refresh action does the same > action he did for loading the current page again. If you submit data > to that page, it will resubmit the data. If you're using the > Location:URL header entry, the browser doesn't "saves" this action as > an action did by the browser itself, and so it will submit the data to > the page where you redirect. If you want to bypass this, you should > use the javascript window.location method instead. formpage.php: <html> <form method="get" action="process.php"> </form> </html> process.php: <?php // do stuff // ... header("Location: http://www.domain.com/formpage.php"); exit; ?> With those two pages in mind you're saying that after I submit the form on formpage.php, do stuff on process.php, then get redirected back to formpage.php that it will replay my form submission when I hit refresh? Thanks, Chris.

« previous php.general (#252000) next »