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
/na valid PHP twins/functions for Sanitizing are:-
mysql_real_escape_string()
-
mysqli_real_escape_string()
-
-
Typecast Numeric Values
Example: $age = (int) $_POST[‘age’];