I'm have a simple HTML form, in which are there some input fields and textareas. Users are allowed to input any texts they want.
In my backend, I use PHP to insert these data into the database (in my case, PostgreSQL). However, I found some special characters, such as single quote, double quote, may lead to failures for SQL execution. I think backslash with other possible character may result in the same problem.
So can anyone list all these special characters I should be care of, or even better, can anyone suggest some simple but reliable methods to avoid such problem ?