I can't seem to find a way to set
$_POST to an empty array.
I have a form in phtml action to self I can get
$_POST values the following ways:
The Above will give
Array ( [form_key] => FThdknnc_347djcncKey_)
Now I've tried to reset by doing:
But it gives me:
Array ([form_key] =>)
That ain't right browser still popping up saying that it will resend data from form: It should return
Array () But the form_key key is still in the
$_POST Array. one can do in php:
$_POST = Array(); and that would be enough but it doesn't work with magento.
Anyone any idea?
You can use unset, check whether still it come out or not..
$params = $this->getRequest()->getParams(); unset($params['form_key']);