Re: limit form input digits
| From: | Malcolm | Date: | Wed, 07 May 2003 19:17:49 +0000 |
| Subject: | Re: limit form input digits | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-146724@lists.php.net to get a copy of this message | ||
Thanks to all who answered. This is for the list;
I got two solutions either maxlength on the html field or
(my favorite) if ($incre > 99) KIS,S !
On Wed, 07 May 2003 08:17:06 -0400, Malcolm <malcolm@mbrownell.com> wrote:
Hello All, I'm trying to limit to 99 the amount of times this prints ; if (ereg ("([^0-9]{2})", $incre)) { echo "bad input"; } else { echo "Printing now ...<br>"; } Reading the manual and the comments I thought the {2} would do that, but it doesn't. I have set the form field size to two but that isn't working either, you can still put more than two numbers in the field even though they don't show. The {2} does keep letters out but how can I limit the input to two digits ?-- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/