Zouari Fourat wrote:
here's the problem :
my user MUST input only digits between 1 and 20
doing a is_numeric and some comparaison can be bypassed by inputing :

.5
or
0.5
or
5.1
or
0.3
or
.01
...
...

so i thought that the smartest way is to use regex


if( $i >= 1 && $i <= 20 && $i == (int)$i) ...

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to