Zend - The PHP Company




Text

Add Code


Add Slashes to all form data fields  

Type: code fragment
Added by: mworld
Entered: 10/08/2000
Last modified: 08/12/1999
Rating: *** (5 votes)
Views: 7862
Add Slashes to all fields submitted from a form. You could also run other functions over the fields.


<?php
while (list($key$val) = each($HTTP_POST_VARS)) {

        if(
$val!="") { // dont process null fields
                
eval("$$key = addslashes("$val");");
        }

}

?>


Usage Example




Rate This Script





Search



This Category All Categories