Hey guys so I have a form with two text inputs, when users fill it in, the data is inserted to a database like this..
$sql = "INSERT INTO $user (note_name, note_body, creation_date)
VALUES ('$name','$note','$date')";
However I am having a problem where when an apostrophe is entered as part of the text input, I get "Error in SQL syntax".. I believe that it is taking the apostrophe as part of the SQL query, right? So say if I enter "Bob's Computer" for the $note variable, the apostrophe in "Bob's" is closing of the apostrophe's around the variable?
Is there any way to resolve this?