stripslashes() is when the PHP
directive magic_quotes_gpc is on
(it's on by default), and you aren't
inserting this data into a place (such
as a database) that requires escaping.
For example, if you're simply
outputting data straight from an HTML
form.
<?php
$str = "Is your name O\'reilly?";
// Outputs: Is your name O'reilly?
echo stripslashes($str);
?>
Let us know when you use stripslashes, what does your input turn into. Does it get into required format. This is to check whether there is something going wrong with your input coming.
Since you have told that without applying mysql_real_escape_string your data gets stored without any blackSlashes... and after applying it you get blackslash... i personally feel double check your code whether you are applying addslashes some where.
Some questions...
- Does this happen only in this current function.
- Check your magic_quotes_gpc is on or off.
- Can you post a part of that function which is causing this problem.