It analyzes the value of parameter that is expected to be a number and if it is numeric, it just cleans any exceeding characters.

If the analyzed parameter value is not numeric, the class add records to a MySQL database with information of the eventual SQL injection attacker details like the IP address, browser identification, logged user name and current date.

SQL injection attacks can be dangerous to a site, as they can make the site work in a way that is controlled by a malicious person.

This class can be used to prevent causing greater damage to a site by detecting eventual SQL injection attacks and blocking the accesses of computers that were used to perform such kind of attack attempts.