mysqli_select_db($link,'test1') or die('Database Open Error');
$sql="select id,username,password from user where username='{$username}' && password='{$password}'";
提示錯誤:king665525c23c8f84a27367d1c86bec4935Error: 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 '\'king\' && password=\'665525c23c8f84a27367d1c86bec4935\'' at line 1
2018-04-22
mysqli_select_db($link,'test1') or die('Database Open Error');
$sql="select id,username,password from user where username='{$username}' && password='{$password}'";
提示錯誤:king665525c23c8f84a27367d1c86bec4935Error: 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 '\'king\' && password=\'665525c23c8f84a27367d1c86bec4935\'' at line 1
求解
2018-03-25
$salt 是存在數(shù)據(jù)庫的,可以用隨機(jī)數(shù)生成。
2017-11-30
$salt的作用是如果別人獲取到了你的用戶名和密碼,但是后面有個令牌,他也不知道到底從哪個地方結(jié)束時密碼
2017-10-31
學(xué)習(xí)了
2017-10-27
$salt是非必須的,salt從安全性考慮的,目的只是增強(qiáng)代碼的健壯性。