Justtechjobs.com Find a programming school near you






Online Campus Both


php3-list | 199903

Re: [PHP3] [HOW TO] Passing serialized data around From: auke <email protected>
Date: 03/27/99

On Fri, 26 Mar 1999, Sascha Schumann wrote:

> > Hi,
> > I've got a question about this. I'm using MySQl to store serialized
> > data, but I don't use AddSlashes, I use ereg_replace("'","''",...)
> > I've tried to use AddSlashes/StripSlashes, but it seems that this can
> > corrupt the data. e.g.
> >
> > Suppose you have a string $temp="a \\'string";
>
> echo $temp
>
> a \'string
>
> You are overseeing that PHP also uses slashes.
>

No, I am not, this is the whole point :) I specifically made this string
to break the serialize/addslashes/stripslashes/unserialize chain when
stored in a mysql database. Because I actually had that happen once :(

regards,
Auke van Slooten

--
PHP 3 Mailing List   http://www.php.net/
To unsubscribe send an empty message to php3-unsubscribe <email protected>
To subscribe to the digest list:  php3-digest-subscribe <email protected>
For help: php3-help <email protected>  Archive:  http://www.php.net/mailsearch.php3
List administrator:  zeev-list-admin <email protected>