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">
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">
It is not a security risk, it is just a name that becomes the key part in the params.
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.