i use this code to check if a number that a user types in a field if it is just number and it is between 1 and 5 characters. It works fine except for, if it is more then 5 characters it will still let it pass by.
elseif (!ereg("[0-9]{1,5}",$number))
the whole code is
elseif (!ereg("[0-9]{1,5}",$number))
{
echo "<center><table border=1 width=300><tr><td><center>The Bank</td></tr>
<tr><td><center>Please Pick numbers between 1 and 5 characters long</td></tr></table>";
}
$number is the number they enter in the field