What’s a SQL Injection Attack?
Some Hacker try to Insert Malicious Code into your Database for Prepare the Execution of some Undesirable Command capable of Revealing Sensitive Information or Damaging your Database.
There are many Useful Way to follow for Prevent SQL Injection Attacks.
A Generic form of Prevention is the following:
- Validating Data
- Sanitize Data Before Insertion
a valid PHP twins/functions for Sanitizing are:
- Typecast Numeric Values
Example: $age = (int) $_POST[‘age’];