Data Cleanse of $_REQUEST array
View Single Post
11-25-2010, 06:33 PM
Join Date: Sep 2007
Originally Posted by
Hi - i'm pulling all input to drive my site from the php $_REQUEST variable and to protect my site from malicious input i want to find a neat way to loop through the $_REQUEST array and cleanse it probably by running a mysql function to remove injection code and also a php strip tags routine. How can i do this and repopulate each REQUEST parameter when i wont necessarily know what variables are set eg. sometimes it might be $_REQUEST['username'] sometimes other stuff but different depending on which command i am processing. Any ideas? Thanks.
$_REQUEST is an array, use foreach.
View Public Profile
Send a private message to Village Idiot
Find More Posts by Village Idiot