Re: stripslashes() strips too much...

From: Date: Fri, 10 Aug 2001 16:49:46 +0000
Subject: Re: stripslashes() strips too much...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62192@lists.php.net to get a copy of this message
"Tyler Longren" <tyler@captainjack.com> wrote in message news:20010810111203.1553b8f5.tyler@captainjack.com... > Hello everyone, > > I've written a small forum. I addslashes() on the message before it goes > into the database. I stripslashes() before the message is displayed on > the page. That all works fine. But if I have a message like this: > "It's in C:\Windows" > there's trouble. The \ gets striped out, so it's then "It's in > C:Windows"; > > Does anyone know anyway to get around this? I've been thinking about it, > but can't come up with anything. > > Thanks, > Tyler Longren > Captain Jack Communications > tyler@captainjack.com > www.captainjack.com > The database will strip the slashes as they go in as they are escapes for the db also... This was discussed recently on alt.php.sql : http://groups.google.com/groups?hl=en&safe=off&th=57ea31ab2e83928b,7 especially message number 4 Peter

« previous php.general (#62192) next »