I have a series of string variables that contain user-entered text created via a form and passed using $_POST.
If the user uses an apostrophe ( ’ ) or single-quote in his/her text, the query that writes the string variable containing the apostrophe to the target table causes a SQL query syntax error!
I remember a solution to this but I have slept a number of time since that moment and can’t remember how to change the query to pass an apostophe/single quote.
Alternatively, I am struggling unsuccessfully at writing a function that would strip out apostrophes before processsing the SQL query.
Any ideas???