Update query not working with GET
$key = mysql_real_escape_string($_GET['key']) ;
$pass = mysql_real_escape_string(trim($_POST['pass'])) ;
$key1="UPDATE login SET pass = '" . $pass . "' WHERE
(key_id = '" . $key . "')";
the variable is passed like this newpassword.php?key=5384f
echo $key; variable does not yield any result ? what could be wrong?
for some reason it's updating all the other passwords except the one where key exists.