<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="jedenhaslocyfra.php" method="post">
<input type="text" name="pole">
<input type="submit" value="wyslij">
</form>
<?php
if (preg_match('@[0-9]@', $_POST['pole'])) {
echo ('ok');
} else {
echo ('error');
}
?>
</body>
</html>