superglobals

Warning “Do not Access Superglobal $_POST Array Directly” on Netbeans 7.4 for PHP

拥有回忆 提交于 2019-11-26 15:00:44
I've got this message warning on Netbeans 7.4 for PHP while I'm using $_POST , $_GET , $_SERVER , .... Do not Access Superglobal $_POST Array Directly What does it mean? What can I do to correct this warning? Edit: The Event sample code still shows this warning. Homerocker filter_input(INPUT_POST, 'var_name') instead of $_POST['var_name'] filter_input_array(INPUT_POST) instead of $_POST Although a bit late, I've come across this question while searching the solution for the same problem, so I hope it can be of any help... Found myself in the same darkness than you. Just found this article,

Warning “Do not Access Superglobal $_POST Array Directly” on Netbeans 7.4 for PHP

不问归期 提交于 2019-11-26 03:49:17
问题 I\'ve got this message warning on Netbeans 7.4 for PHP while I\'m using $_POST , $_GET , $_SERVER , .... Do not Access Superglobal $_POST Array Directly What does it mean? What can I do to correct this warning? Edit: The Event sample code still shows this warning. 回答1: filter_input(INPUT_POST, 'var_name') instead of $_POST['var_name'] filter_input_array(INPUT_POST) instead of $_POST 回答2: Although a bit late, I've come across this question while searching the solution for the same problem, so