Reply to Re: Warning: ereg(): REG_BADBR

Your name:

Reply:


Posted by Schraalhans Keukenmeester on 04/28/06 17:13

millw0rm@gmail.com wrote:
> why i m getting error here???
>
> Warning: ereg(): REG_BADBR
>
>
> code:
> if(!ereg("^(.){15,400}$",$string)) {
> $errormsg[1] = "- Must be more then 15 Characters & less then 400
> Characters";
> }
>
>
> Want to Achive:
> $string is a textarea, i want the user to input atleast 15 characters
> and shldnt exceed more then 400 characters!
>
> thnx
>
Although I am all pro-serverside coding, I'd rather implement these
simple input type checks on the client side, using Javascript. Much more
user-friendly than filling out forms and after each submit be told it's
wrong.

Besides, ereg is slow, compared to strlen, as Kimmo already explained
how to use.

Sh.

--
Backbone Scoliosis

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация