You are here: Re: i can not get addslashes/stripslashes to have the same effect on different servers « PHP Programming Language « IT news, forums, messages
Re: i can not get addslashes/stripslashes to have the same effect on different servers

Posted by Jerry Stuckle on 01/12/07 19:44

Ruben van Engelenburg wrote:
> lawrence k wrote:
>
>> I'm working at two different companies right now, and so I'm dealing
>> with 2 different servers, but I've been using this same class in all my
>> code. One one server I have to uncomment the line with stripslashes. On
>> the other server I need to leave it commented. Surely there is a way to
>> make this code work on all servers?
>>
>
> Hi Lawrence,
>
> Just a guess: check your magic_quotes_gpc setting in php.ini. If it's
> set to on turn it off and just use stripslashes and addslashes.
>
> Ruben.

Yes, check your magic_quotes_gpc. But don't use addslashes on data to
be used in a MySQL query. Use mysql_real_escape_string() instead.
That's what it's for - and it is charset sensitive. addslashes() is not.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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