I have a PHP function that check all of my php files, so none of the attacks could upload any script of something.. Although, my client's site is too old and a couple of days ago, I got a message from the server that says: MYSQL injection and the query is being tried to be used.
The system has a PHP version: 5.2.17 and there are mysql_queries that is being deprecated ... Although the update of the system is too hard to be done..
i tried to find a solution and check for these ones:
- mysql_real_escape_string()
- is_numeric()
- htmlspecialchars(value, ENT_QUOTES)
I do not know if any of these counts! Does any of the above works, in order to avoid the SQL Injection?
Moreover, I found this one, as a good solution:
Use: filter_input(..) of PHP
the attack was made in $_GET value, but did not touch the DB.. yet.. The query I saw was something like identifier..
Any suggestion or help would be appreciated!