<?php$link = mysqli_connect("localhost", "root", "", "test") or die(mysqli_error);$name = $_POST["user"];$pw = $_POST["password"];if($name == "" || $pw ==""){echo "輸入賬號和密碼";}else{$sql = "select * from user where logoin name == $name and pw = $pw ";$qurey = mysqli_query($link,$sql);$num = mysqli_num_rows($qurey);if($num){$row = mysqli_fetch_array($query); //將數(shù)據(jù)以索引方式儲存在數(shù)組中echo $row[0]." 歡迎!";}else{echo "<script>alert('用戶名或密碼不正確!');history.go(-1);</script>";}}?>這是代碼求大神看看哪里錯了
php登陸頁面一直密碼賬號錯誤
月關(guān)寶盒
2018-07-03 09:09:51