Use is_numeric() http://www.php.net/is_numeric
See also the ctype functions which can be read about here: http://www.php.net/ctype And yes, regular expressions are another option but aren't needed here. Regards, Philip Olson On Sat, 21 Dec 2002, Beauford.2002 wrote: > Hi, > > First off, thanks to all those that helped out with my other questions. Not > all my problems were solved, but I'm certainly closer. Still working on the > same project I need to do the following. > > I have a form where users input numbers only, is there a way I can have php > check to make sure a letter or other character didn't get put in by > accident. I was looking at ereg, but not to familiar with this or if it > would work in this case. > > TIA > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php