Clearing _POST array fully

前端 未结 6 993
面向向阳花
面向向阳花 2020-12-05 10:17

I want clear $_POST array content fully, all examples what I see in internet, looks like this:

if (count($_POST) > 0) {
    foreach ($_POST as $k=>$v)          


        
6条回答
  •  执笔经年
    2020-12-05 10:33

    The solutions so far don't work because the POST data is stored in the headers. A redirect solves this issue according this this post.

    How to delete $_POST variable upon pressing 'Refresh' button on browser with PHP?

提交回复
热议问题