<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form action="ostatninegacje.php" method="post">
<input type="text" name="pole">
<input type="submit" value="wyslij">
</form>
<?php
if (preg_match('@^[^a-z]+$@', $_POST['pole'])) {//+oznacza minimum jeden raz(min jedne znak)
echo ('ok');
} else {
echo ('error');
}
?>
</body>
</html>