I am new to functions and am trying to clean up ALL fields from a form... I can get this to effect all fields but If I try to add a second function THAT function doesn't effect anything...
any examples of how to do multi-functions against all input fields would be extremely appreciated.
here what I have
<? // [cleanup.inc] : Clean form text on input.
function clean_input ()
{ foreach ($_POST as $key => $value)
{ $_POST[$key] = strip_text ($value); }
}
function strip_text ($text)
/* Do your cleaning/stripping functions here. Actual text cleanup, etc. */
{ return str_replace ("badword", "*CENSORED*", $text);
return str_replace ("damn", "***You can say Damn***", $text); } ?>
?>[/code]