Unexpected addslashes/stripslashes-behaviour?

From: Date: Wed, 05 Jun 2002 10:59:40 +0000
Subject: Unexpected addslashes/stripslashes-behaviour?
Groups: php.general 
Request: Send a blank email to php-general+get-100678@lists.php.net to get a copy of this message
I'm just having a little problem using addslashes/stripslashes here, and I'm wondering if this actually is the expected behaviour: I get text from a form post, let's say "This sucks :\". I do $text = addslashes($_POST["fieldname"]); and stick $text in a DB. When I pull the text back out, and run stripslashes on the text, the result is: "This sucks :".. the \ is gone... Is it supposed to do this? As far as I've seen I need stripslashes on data from a DB already addslashed... so.. what's going on? -- Trond Arve Nordheim - "This message has been ROT13-encrypted twice for extra security" ------------------------------------------------- This mail sent through IMP: http://horde.org/imp/

« previous php.general (#100678) next »