Function to clear $_POST values

I was just wondering if there is a function to clear $_POST values?

I have an application that saves and previews. It is setup so the form fields maintain the $_POST value on submit for the preview function. This causes a problem though when you save because the fields remain set to the $_POST values.

I would like to be able to leave the values there on preview but clear them when the info is saved. Is this possible?

unset($_POST); ?

Thanks Dangermouse, that did the trick! :slight_smile:

unset($_REQUEST);

to clear post and get in one hit

I don’t think that unsetting the $_REQUEST array will automatically unset the GET, POST, COOKIE variables.

-Helge :slight_smile:

bugga :frowning:

I am still new to php, will take that on board.

thanks

No worries. :wink:
What you assumned is easy to do. I wasn’t sure myself either, so I had to do a small test.

-Helge :slight_smile: