Verification in Forms
Posted: Fri Mar 14, 2003 2:41 am
Hi,
I've made a form for user-Adds. I want to verify, that one textfield is checked for "not empty" and one other checked for- it has to be an int oder double.
e.g.
if (empty($_POST[C]))
{
echo "here's the output, when if ist TRUE<br>";
}
I've done all with POST and everything ist fine with empty, but how can a form-textfield be checked for, that the Value has to be a Number?
Can I make this wir is_int oder is_double somewhere in the IF-Block. Some like:
if ( (empty($_POST[C])) && (is_integer($_POST[A])) )
.... bla
?????
Jan
I've made a form for user-Adds. I want to verify, that one textfield is checked for "not empty" and one other checked for- it has to be an int oder double.
e.g.
if (empty($_POST[C]))
{
echo "here's the output, when if ist TRUE<br>";
}
I've done all with POST and everything ist fine with empty, but how can a form-textfield be checked for, that the Value has to be a Number?
Can I make this wir is_int oder is_double somewhere in the IF-Block. Some like:
if ( (empty($_POST[C])) && (is_integer($_POST[A])) )
.... bla
?????
Jan