如何将mysql_real_escape_string()
功能添加到$password_md5
和$username
?帮助将不胜感激
$query="UPDATE `users` SET `password` = '$password_md5' WHERE `username` = '$username'";
有些机构可以给我这个脚本,请忘了怎么做。 一个例子真的可以帮助我
答案 0 :(得分:0)
$query="UPDATE users SET password = '".mysql_real_escape_string($password_md5)."' WHERE username = '".mysql_real_escape_string($username)."'";
答案 1 :(得分:0)
$username = mysql_real_escape_string($_POST['username']);
$password_md5= mysql_real_escape_string(md5($_POST['password']));
$query="UPDATE `users` SET `password` = '$password_md5' WHERE `username` = '$username'";