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
https://forums.phpfreaks.com/topic/38150-_post-date/#findComment-182626
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.