I am new to databases and security.
I am planning to put up a website.
I've read that sql-injection vulnerabilities can be very dangerous since the server might leak user passwords and credit-card information.
Are there any steps that I need to follow to prevent SQL injection vulnerabilities?
I was going through a wiki on sql-injection, but I didn't understood the following query:
SELECT * FROM users WHERE name = '" + userName + "';
userNamevariable. Consider what would happen ifuserNamewas filled in by the user as:';DROP TABLE users + '- this would have the unfortunate side effect of deleting the Users table, with no warning, and no way of preventing it. The double-quotes encapsulate the bad query, essentially forcing it to be evaluated as part of theWHEREclause. – Max Vernon Sep 27 '12 at 6:02