Re: Make sure only numbers are in field
| From: | Philip Olson | Date: | Mon, 08 Jan 2001 20:45:01 +0000 |
| Subject: | Re: Make sure only numbers are in field | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-33307@lists.php.net to get a copy of this message | ||
rotate the $ and + and be sure to check out that tutorial, here it is
again :
http://phpbuilder.com/columns/dario19990616.php3
yes this "mistake" was given to you but with some research and playing it
could be figured out. Although, regex does seem "impossible to learn" at
first :-) and please keep same questions within same threads as this is
part of your previous question.
philip
On Sat, 8 Jan 2000, Brandon Orther wrote:
> I have this to check for anything other than a number:
>
> -------------------------------------
> if( ereg( "^[0-9]$+", $amount )) {
>
> Only numbers No Chars
>
> } else {
>
> Not All Numbers
>
> }
> -------------------------------------
>
> Does anyone know how to make sure it is a number but not be limited to 0-9,
> I want it to go from 0-infinite
>
> Thank you,
>
> --------------------------------------------
> Brandon Orther
> WebIntellects Design/Development Manager
> brandon@webintellects.com
> 800-994-6364
> www.webintellects.com
> --------------------------------------------
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>