Click to See Complete Forum and Search --> : HOw can i clear the data in the $_POST??


silvermoon
04-26-2006, 10:39 PM
how can i clear the data in the post???

SpectreReturns
04-26-2006, 10:43 PM
Err, $_POST isn't sent more than once, so you should need it if you're sending it. Anyway, your best bet is:

$_POST = array();

That should maintain its ability to act as a superglobal.

The Little Guy
04-26-2006, 10:46 PM
I think your mean somthing like this, but not sure.

$cat = $_POST['kitty'];
$cat = $_POST[''];

SpectreReturns
04-26-2006, 10:50 PM
I think your mean somthing like this, but not sure.

$cat = $_POST['kitty'];
$cat = $_POST[''];
No. That makes a variable from post "kitty" and then proceeds to set it to post "". This makes it unnessecary to originally set it, and would act odd if there was a null named field in the form.

silvermoon
04-26-2006, 11:02 PM
guys hear me out this is my problem

1st is1 have textboxes for name and address and a submit button then when i click submit it should be saved in the mysql database. the script that runs this is verify.php so the action of it is verify.php but when i refresh the verify.php it will then save it again and i dont like dat so pls help me out on this.

SpectreReturns
04-26-2006, 11:07 PM
It isn't possible, your browser will want to send them again. You could send a header request though, sending the page to somewhere else so that refreshing would do nothing.