I want when the user submit the form and the query execute successfully the information in the $_POST delete and unset because if the user refresh the page the query execute once again and make another similar row in the database so I want when the query execute the information delete.I user unset($_POST) but it doesn't make doofrence.How can i fix this problem?
10-25-2009, 11:32 AM
Carn't you do this? $_POST = array();
10-25-2009, 06:04 PM
You cannot unset $_POST in this case after the form submission. It sounds like the form processor to also acting as the landing page. So unsetting $_POST is useless because on refresh it will be re-populated.
What I'd recommend it redirecting to a landing page. This will make the request method GET and thus not re-submit the form when refreshed:
/* - - - - - - - - - -
* Was the form submitted?