woo nice one stolzyboy
that post about the number thingy worked!! i just converted it to use text or numbers (btw text includes _ automatically)
heres the final code for the rest of people with the same problem:
<?
$text = $_POST['text'];
$test = preg_match("/^(\w+)$/",$text);
echo $test;
if ($test==0) {
echo "(BAD) Your text input contained none-allowed characters";
} elseif ($test==1) {
echo "(GOOD) Your text input only contained the alphabet, digits, and underscore!<br>$text";
}
} else {
echo "<form action='test2.php' method='POST'>
Enter Here: <input type='text' name='text'><br>
<input type='submit' value='submit'>";
}
?>
even though there isnt a \d (digits) it still accepts them with or without letters.
so current thing is all letters, digits and underscore, nothing else,
i havn't tried spaces yet
===edit===
tried spaces, they dont let them either WOO
works perfectly, now to integrate it into my login/register script!!