Reputation: 3168
I have always wondered when you do web forms on your website whether it is sign up forms or search field, you give away your field name so is that a security risk or no? What's the best way to prevent that?
E.g: <input name="person_name">
Upvotes: 0
Views: 258
Reputation: 10874
Please don't try to prevent SQL injection attacks by escaping characters. Use the PDO API to create parameterized queries. See the PDO manual on Prepared Statements
Not using the same database column names and HTML form field names is security by obscurity at best.
Upvotes: 1
Reputation: 490333
It is not a security risk, it is just a name that becomes the key part in the params.
Upvotes: 1