I need people to submit a dollar value in a form... when they submit the form it checks to make sure that all the fields are filled out. ie.
if (!$something) {
$error = "fill something in";
} else {
// process form
}
I tried:
if(is_numeric($price)) {
$error = "whatever";
} else {
// process form
}
As you can see in my example, the reverse to what should be happening is occurring. In perl I could use something to the effect:
if ($price ne "numeric") {
$error = "whatever";
} else {
// process form
}
Just wondering if PHP4 has something like this... or how else to go about it. The price can be any amount with and optional 2 decimal places.
Thanks,
-dr