There some problem in my query.
$test = "Don't look at me";
mysqli_query("INSERT INTO testtable SET testfield = '".$test."' ");
Notice there is a single quote on the string. When I execute it, it returns an error like
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't look at me ...
If I remove the single quote in the string, it works fine. So how can I save the string into the database without removing the single quote?