Hi!
just found this script to prevent bad form entry :
function clean($input){
$input = strip_tags($input);
$input = htmlspecialchars($input);
$input = addslashes($input);
$input = trim($input);
return $input;
}
but if i've got 4 field in my form :
$firstName = $REQUEST['firstName'];
$lastName = $REQUEST['lastName'];
$from = $REQUEST['email'];
$message = $REQUEST['message'];
how can i easely run the fouction on each variable ????
$firstName = clean($firstName);
$lastName = clean($lastName);
$from = clean($from);
$message = clean($message);
is it the proper way to do it ???