10/10/2018, 00:21
Lỗi MySQL Query : You have an error in your SQL syntax;
Em có edit 1 code , ban đầu chạy bình thường nhưng sau lỗi
Send cho người khác thì họ vẫn vào bình thường nhưng chỉ 1 mình mình vào thì nó bị vậy (đã del hết cookie vẫn bị)
Lỗi MySQL Query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' at line 1
Bài liên quan
$password = $_POST['password'];
$akudanh = $mysql->query("SELECT salt FROM user WHERE username = '".$username."'");
while ($THT = $mysql->fetch_array($akudanh)) {
$salt = $THT['salt'];
}
$q = "SELECT userid FROM user where username = '".$username."' and password = '".md5($password) . $salt."'";
<?
$username = $_POST['username'];
$password = $_POST['password'];
$akudanh = $mysql->query("SELECT salt FROM user WHERE username ='$username'");
while ($THT = $mysql->fetch_array($akudanh)) {
$salt = $THT['salt'];
}
$sss=md5($password).$salt;
$q = "SELECT userid FROM user where username = '$username' and password = '$sss'";