Reply to Re: [PHP] Regular Expressions?

Your name:

Reply:


Posted by Dan on 04/09/05 04:31

list_php_general@controlaircorp.com wrote:
> Windows 2000 Server
> IIS 5/Apache 1.3.33
> MySQL 4.1.1
> Smarty 2.6.9
> PHP 5.0.3
>
> Hi all,
> I am looking for help handling a form input to SQL. I believe the solution has to do with regular expressions.
> My big problem is that when a user submits data such as:
>
> Joe's Crabshack
>
> The ' apostrophe or " can cause an early truncation of the data. My code thinks that the closing identifier is after the word Joe and the rest of the input is lost. Further, if the data does get by and it could possibly break a SQL statement.
>
> Am I right in thinking the solution in this matter is using regular expressions? If so, where is a good resource to polish my skills?
>
> What about turning off/on magic quotes?
>
> John
>

If you don't plan on doing anything this weekend, pick yourself up a
copy of O'Reilly's Regular Expressions. It's "The Owl Book", by the cover.

The reason why I ask if you have all weekend is because it's a good
book, but at 300+ pages, it's a good read. I still don't know my
regex's very well, but then again, I just kinda skipped through it.
However, it is laid out in a format that makes it a very good reference
book, so if you're looking to do something, then this book makes it easy
to "piece things together" and find a regex that works quite well.

Thanks
-dant

[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

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