You are here: Re: [PHP] preg_match - help please « PHP « IT news, forums, messages
Re: [PHP] preg_match - help please

Posted by John Nichel on 10/30/00 11:22

André Medeiros wrote:
> That's not very nice of you, saying that to people who try to help ;)
>
> if( strpos( $_POST['frmName'], ' ' ) === false ) {
> // Do error handling here
> } else {
> // All is OK :)
> }
>

How does that match "Firstname Lastname" better than a regex? That will
return true as long as there is at least one space, no matter what the
rest of the submission is. I could submit "$^&#^&$&#& )(*!@#", or I
could submit just a single space, and that would return true. strpos()
has it's uses, but this isn't one of them.

--
John C. Nichel
ÜberGeek
KegWorks.com
716.856.9675
john@kegworks.com

 

Navigation:

[Reply to this 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

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