Am I right in in thinking that the stmts below will
strip off tags from the post variables and put those cleaned up srings into
the left hand side vars ?
$N_new_stat = $POST["x_new_stat"] = strip_tags(trim($POST["x_new_stat"]));
$N_new_loc = $POST["x_new_loc"] = strip_tags(trim($POST["x_new_loc"]));
$N_feat = $POST["x_feat"] = strip_tags(trim($POST["x_feat"]));
if I use the following foreach loop after doing the above
will it be using the cleaned up POST vars ?
foreach ($_POST as $field => $value){
if ( !ereg("agent",$field) and !ereg("new",$field) and !ereg("yr_ref",$field))
{
if ( $value == "" ||$value == " "){
$mess = "yes";
$message = "Please complete ALL the fields:".$field;
require_once ("homes_add_fm.php");
exit();
} // endif
} // endif
} // end foreach
Thanks for your help.