I have a basic form. One of the fields telephone_number1 is not mandatory.
However If someone fills it in, I would like to make it mandatory, to ensure the field is !is_numeric
This is the part I cannot get my head around. Any ideas would be appreciated.
Using the code below, common sense tells me to first check the field for a post value. Then if there is a post value check if it is numeric. If it is numeric and filled in continue.
However of course I cannot continue, since $_POST['telephone_number1] will always be TRUE
Its early in the morning, so excuse me.
if ($POST['telephone_number1'] && (!is_numeric($POST['telephone_number1'])) { $error7a='[ Please enter valid number ]'; }