Re: mysql + addslashes + stripslashes
| From: | Drewcore | Date: | Mon, 16 May 2005 18:30:45 +0000 |
| Subject: | Re: mysql + addslashes + stripslashes | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-215314@lists.php.net to get a copy of this message | ||
> 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_string() instead...
http://us4.php.net/manual/en/function.mysql-real-escape-string.php
but that's just me. i would run any user input through that function
to make sure that it's 'safe' to put in your database. of course, i
would also be checking the input to make sure that it safe by other
means as well. hope that helps.
-drew
--
dc .. drewcore.com