PHP/Data Type/ctype digit
Версия от 10:37, 26 мая 2010; (обсуждение)
Validating a number with ctype_digit()
<?php
if (! ctype_digit($_POST["age"])) {
print "Your age must be a number bigger than or equal to zero.";
}
?>
<?php
if (! ctype_digit($_POST["age"])) {
print "Your age must be a number bigger than or equal to zero.";
}
?>