Hi,
interessant ist auch, dass es bei einem Testscript funktioniert, wie es soll. Bin mal gespannt, woran das wirklich liegt.
So funktioniert es auch:
<?php
if (isset($_REQUEST['save'])) {
$text = $_REQUEST['testtext'];
$text = trim($text);
$text = preg_replace('/[\s\t]/', '', $text);
$text = str_replace(' ', '', $text);
if (is_numeric($text) && (strlen($text) <= 20) )
echo $text . "\n";
else
echo "Fehler\n";
}
else {
echo <<<EOT
<html>
<head><title>test</title></head>
<body>
<form method="post" action="">
<input type="text" name="testtext" value="">
<input type="submit" name="save" value="submit">
</form>
</body>
</html>
EOT;
}
?>