When I insert a word that has apostrophes in the HTML input I get this error
Error: ER_PARSE_ERROR: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near
For example: inserting word without apostrophes like "Hello world" works succesfully and I can see the row in the MySQL table. But, when I insert words like "that's" then I get the error.
I use varchar for the value row.
connection.query("INSERT INTO masstoadmin (`title`,`contact`,`theuser`,`ptime`,`touser`,`mass_stat`) VALUES ('"+title+"','"+contact+"','"+theuser+"','"+ptime+"','"+tuser+"','"+nmasso+"')");