I created a form to collect user data, including address and write them in a Mysql DB.
In the user table, Street
is a Varchar (255)
.
Everything works fine, unless in the name street there's an apostrophe, in this case I have
the following SQL warning:
For example, if in the Street
name I put "Francesco D'assisi 24"
Error: 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 'assisi 24'
,
Any idea how to avoid it?