You are here: Re: single quotes « PHP Programming Language « IT news, forums, messages
Re: single quotes

Posted by Bruno Barberi Gnecco on 04/24/07 20:57

Rik wrote:
> Iván Sánchez Ortega wrote:
>
>> charlespb69 wrote:
>>
>>> I am new to php so this might be a real simple question. I have a
>>> form that users are able to input information into and the information
>>> goes into a mysql database table.. But single quotes (apostrophes)
>>> are giving me problems. What can I do about this?
>>
>>
>> RTFM, and use mysql_real_escape_string() when appropiate. That
>> means "always".
>
>
> I thought always, always, always :P
>
> (Not true though, often you can use intval()/floatval(), possibly aided
> by foreign key checks.)
>

Also, check that magic_quotes (http://php.net/magic_quotes) is
unset.

--
Bruno Barberi Gnecco <brunobg_at_users.sourceforge.net>
Imbalance of power corrupts and monopoly of power corrupts absolutely.
-- Genji

 

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

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