Skip to content
Advertisement

MySQL error because of syntax in Custom PHP code

I am trying to enter user’s data into a database. I think the commas in the address are causing the error.

JavaScript

Advertisement

Answer

As others have noted, your code is vulnerable to SQL injections. You should consider using parameterized queries:

JavaScript

For more information refer to the PHP manual on MySQLi prepared statements.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement