mysql_real_escape_string issue
Posted: Mon Sep 06, 2010 3:21 pm
I have the following code:
I have a title: Testing Amy's Ideas
If I edit this entry and then use the code above I end up with: Testing Amy/'s Ideas
This issue does not appear to affect the article content itself (sent under $_POST['thearticle']) so I am slightly confused. I tried stripslashes() on the above but to no avail (mysql_real_escape_string(stripslashes($_POST['title']))).
Any ideas/suggestions?
Code: Select all
$updateQuery = "UPDATE ".$settings['tbl_articles']." SET txtTitle = '"
.mysql_real_escape_string($_POST['title'])."', txtArticle = '"
.mysql_real_escape_string($_POST['thearticle'])."', dteEdited = NOW() WHERE ID = "
.$_GET['id'];
If I edit this entry and then use the code above I end up with: Testing Amy/'s Ideas
This issue does not appear to affect the article content itself (sent under $_POST['thearticle']) so I am slightly confused. I tried stripslashes() on the above but to no avail (mysql_real_escape_string(stripslashes($_POST['title']))).
Any ideas/suggestions?