i use this sql statement:
if the $description contains strings that dont have apostrophies in it, it will update the table, but if there's an apostrophy somewhere in the string, the table will not be updated.
"UPDATE webhost SET Description='$description' WHERE Email='$email'"
Can anybody help?
You have to escape the aposthrope with '\'. So instead of :
$question = "What's this?";
use this :
$question = "What\'s this?";
or you can use PHP's addslashes() function :
$question = addslashes($question);