Insert comment problem
Posted on 2007-04-02
I'm having some problems with inserting comment using form with word that contains a ' , example when trying to insert word like simon's, it gives error.
$Query = "INSERT into classifieds (comment) VALUES( '$comment')";
I tried to use the solution $comment = str_replace("'", "", "$comment"); it works but simon's will becomes simons. Is there a way to insert word with ' without getting an error and can be display on page?