I have a PHP script with this code:
$sid = $_COOKIE['sid'];
$q = mysql_query("SELECT * FROM `order` WHERE `sid` = '$sid' AND `use` <> 1");
In a MySQL table with name users
, I have the following columns: id
, name
, md5password
.
How can I do:
UPDATE `users` SET `md5password` ='newpassword'`
with a potential SQL injection in PHP? Can you give me an example?