PHP validation function. Check for numeric and positive -
little confused how code this. user inputs numbers, validation checks make sure numeric , positive. user can leave field blank.
this have far, checks see inserted.
$error_blue = check_blue($phone); if($error_blue !=''){ print "<p>blue: $error_blue"; }
is item validated @ top of page.
function check_blue($blue){ if(! is_numeric($blue)){ return'please enter valid number blue.'; }}
is function is. on here appriciated.
something this?
function check_blue($blue) { if (is_numeric($blue) && $blue > -1) { return 1; } else { return 0; } } if(!check_blue($phone)) { return'please enter valid number blue.'; }
Comments
Post a Comment