Jump to content

$_POST date


vbnullchar

Recommended Posts

when you hit F5 the data will be sent again so it will be placed back into the POST array. The post array is stateless anyway - so expecting it to do something different when you repeat a submit is a bit daft - it is populated on a request and emptied at the end of the processing of the request if you repeat the request then it will be populated once more.

 

If you put unset($_POST); at the very top of your script and then submit you should see that the post array is cleared.  If you are trying to prevent a double posting of a comment or similar then you should process the data and the use..

 

header('Location: donepage.php');

 

This will prevent a fresh sending the data once more.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.