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" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> > 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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to