<html><body> <?php if(isSet($andmed)){ if(ereg("^[0-9]+$", $andmed)){ echo "Andmed sobivad"; } else { echo "Andmed ei sobi"; } } ?><p> <form> Arv: <input type="text" name="andmed"> </form> </p> </body></html>