Re: Clearing Post Data with IE

From: Date: Wed, 24 Mar 2004 00:10:39 +0000
Subject: Re: Clearing Post Data with IE
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-181334@lists.php.net to get a copy of this message
I tried using the Header('location: ....') but it seems the posted data follows the redirection Im going from my main page to a processing page then back to my main page. i printed $_POST on the main page and it still has the values that were originally posted to the processing page. Also after the redirection the address in the address bar is that of the processing page Here is some code to help explain: --index.php print_r($_POST); ... echo "<form action='poll.php' method='POST'>"; echo "<input name='poll_id' type='hidden' value='$poll_id'>\n"; echo "<input name='calling' type='hidden' value='" . $_SERVER['PHP_SELF'] . "'>\n"; foreach($poll->choices as $id => $choice) { echo "<input name='poll_choice' type='radio' value=$choice->id >$choice->choice<br>\n"; } echo "<input type='submit' value='submit'>"; echo "</form>"; --poll.php $poll_id = $_POST['poll_id']; $poll_choice = $_POST['poll_choice']; $calling = $_POST['calling']; if (isset($poll_id)) { unset($_POST); Header("Location: $calling"); exit(); } When poll.php loads up index.php the Posted data is still there. Chris "Chris Boget" <chris@wild.net> wrote in message news:01c101c41106$678a4f50$8c01a8c0@entropy... > > Is there a way to get it so that i can clear _post and get it so they > arent > > in the header?? > > After you've finished all of the processing, just do: > > header( 'location: ' . $_SERVER['PHP_SELF'] ); > exit(); > > Chris

« previous php.general (#181334) next »