I think I have a full working site with many calls to the MySQL server and some research on this site I saw that makes my queries in this form:
$query = sprintf("SELECT * FROM users WHERE user='%s' AND password='%s'", mysql_real_escape_string($user), mysql_real_escape_string($password));
I can solve the security problem, but, as I said, I have many calls to the MySQL server, and the best way (in my case) to solve this problem is directly related to vars im sending the request, but without using the MySQL function, because im out of request. Let me explain this, I have the following:
mysql_query("SELECT * FROM `post` WHERE id=" . $_GET['edit']);
I cannot make changes to this request because I have a lot of all this in all my code so that I can check for injections on var, $ _GET ['edit'].
How can I use pure PHP validation for SQL injection for variable queries? How:
$_GET['edit']=freehack($_GET['edit']);
php mysql sql-injection
DomingoSL
source share