Domanda

My code has multiple $_POST variables. I like to clean things up and unset them after everything has been executed.

I don't want to have to list each $_POST out individually. Is there a good way of unset all $_post values at once. I don't want to unset my $_SESSIONS or other variables. Just the Post ones.

Any helpful hints is very much appreciated.

I tried using unset($_POST); - but it does not unset the values. Thanks

È stato utile?

Soluzione

It is as simple as it gets. Try this:

$_POST = array();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top