Re: [PHP] mysql + addslashes + stripslashes

2005-05-17 Thread Milen Yordanov
o: "Pieter Breed" <[EMAIL PROTECTED]> Cc: "Petzo" <[EMAIL PROTECTED]>; Sent: Tuesday, May 17, 2005 5:00 AM Subject: Re: [PHP] mysql + addslashes + stripslashes > On Mon, May 16, 2005 5:16 am, Pieter Breed said: > > My problem is that I have a large array (wi

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Richard Lynch
On Mon, May 16, 2005 5:16 am, Pieter Breed said: > My problem is that I have a large array (without any funnies like > self-referencing) getting serialized. There are some funnies in the string > fields though (like `'`s etc). After making a roundtrip to the mysql > database, things start to get ba

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Drewcore
> I do suspect though, that the problem lies with how I am using addslashes > and how I am not using it. Any definitive help would be much appreciated. i'm not an expert at this, but i think that since you're using mysql to store your data, you shouldn't use addslashes() and use mysql_real_escape_

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Pieter Breed
Hi, I have a similar problem at the moment. I was waiting to scrape together an example, but since you posted first I will jump into the discussion now. My problem is that I have a large array (without any funnies like self-referencing) getting serialized. There are some funnies in the string

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Petzo
Thanks for the reply from 1 to 4 I do the same.I havent wrote it here so that my sample to be more short whhat i didn't get from your reply was that part: > For data that comes from SQL sources: > 1. check magic_quotes_runtime PHP setting... so what do you do if that setting is on/off (in my cas

Re: [PHP] mysql + addslashes + stripslashes

2005-05-16 Thread Bostjan Skufca @ domenca.com
I do the following way to achieve portability: For GET/POST/COOKIE variables: 1. check "magic_quotes_gpc" PHP setting - if enabled strip slashes from input variables using stripslashes() 2. check input/anything 3. prior building SQL query escape stuff (mysql - mysql_real_escape_string(), others