PHP/Data Type/ctype digit

Материал из Web эксперт
Перейти к: навигация, поиск

Validating a number with ctype_digit()

   <source lang="html4strict">

<?php if (! ctype_digit($_POST["age"])) {

   print "Your age must be a number bigger than or equal to zero.";

} ?>

 </source>