Menu
Hello
I am using this simple ereg to check a field.
When doing a var_dump($_POST); it shows that the element is
string (4) ‘1111’ . Despite this my ereg routine doesn’t accept that I have a number in the field. What am I doing wrong ?
Thanks for any help! ?
[code=php]
/*
* Check the Price field
*/
if(!ereg(“^[0-9]$”,$N_price[$i]))
{
$mess = “yes”;
$message1 = “All prices must be numbers only.”;
$message2 = ” – or a decimal point. See line no : “.$Di.” Price: “.$N_price[$i];
require_once (“head.inc”);
require_once (“c_sal_ord_bfm.php”);
exit();
} // endif