Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001041

Re: [PHP-DB] Forms : Validating user input is integer From: Boclair (boclair <email protected>)
Date: 04/05/01

"Matt Williams" <matt <email protected>> wrote in message
news:BKEBLPOMMAKCLHIBKBOECEHHDAAA.matt <email protected>
|
| > or even just
| > elseif (!eregi("[^a-zA-Z]"),$num)) { }
|
| But that would not stop other characters.
|
| M@

Whoops! Careless of me. The line should read, and as I tested it,

elseif (eregi("[a-zA-Z]",$num)) { }

Do you see any problem with this?

I have tried with every type and mix of input that I can think of and
was successful in denying all but digit inputs, but I have little
confidence in what I am doing. With your examples I am at least
coming to some understanding of Dario Gomes article on PHPBuilder.

Tim

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe <email protected>
For additional commands, e-mail: php-db-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>