Hmm, not exactly.
This is sort of what I am looking for:
If the input ($name) is test, then the message should be like: 'Name approved' should be seen.
If the input is test123, then a message of 'Name NOT approved' should be seen. Note this should also disallow an input like 'test 123' (note the space)
I tried the following, but it did not work either for only allowing alphacharacters:
<?
$new_name = $character;
if (eregi("^[a-z]$", $new_name)) {
echo "Name approved";
} else {
echo "Name NOT approved";
}
?>
Any thoughts?