I have done a phpinfo and yes, magic_quotes_gpc is now off.
Here is a sample of what I'm trying to do...
$comment = mysql_real_escape_string($_POST['comment']);
$name = mysql_real_escape_string($_POST['name']);
$query = "INSERT INTO commenttable VALUES ('$comment','$name)";
$result = mysql_query($query) or die(mysql_error());
Suppose $_POST['comment'] is:
This didn't work
What happens is that in the database, it looks like:
This didn\'t work
So when I do something like:
$result = mysql_query("SELECT * FROM commenttable") or die(mysql_error());
while($row = mysql_fetch_array( $result )) {
echo $row['comment'];
}
the comment appears with the prepended backslash, forcing me to use strip slashes to make it look right.
What am I missing here? Thanks...