|
Posted by news on 09/17/05 23:58
I'm trying to make sure a form has only one or two digits in either of
two fields.
I looked at php.net and
http://www.regular-expressions.info/reference.html and this is what I
put together, but while it successfully refuses any non-digit, it still
lets any number of digits through.
Any suggestions?
if ((ereg("([0-9]{1,2})", $people))&&(ereg("([0-9]{1,2})", $rooms))) {
Thanks!
Liam
Navigation:
[Reply to this message]
|