hno Posted October 25, 2009 Share Posted October 25, 2009 HI 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? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/178907-how-to-unset-_post/ Share on other sites More sharing options...
Gayner Posted October 25, 2009 Share Posted October 25, 2009 HI 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? Thanks just do unset(); Quote Link to comment https://forums.phpfreaks.com/topic/178907-how-to-unset-_post/#findComment-943874 Share on other sites More sharing options...
mikesta707 Posted October 25, 2009 Share Posted October 25, 2009 refreshing the page sends the post data again, so using unset($_POST) won't work Quote Link to comment https://forums.phpfreaks.com/topic/178907-how-to-unset-_post/#findComment-943875 Share on other sites More sharing options...
trq Posted October 25, 2009 Share Posted October 25, 2009 Your best bet is to redirect the user to another page once your query is executed. Quote Link to comment https://forums.phpfreaks.com/topic/178907-how-to-unset-_post/#findComment-943883 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.