我在这段代码中遇到了 mysqli_query 的问题:
<?php
session_start();
$user = $_POST['user'];
$pwd = $_POST['pwd'];
include "connect.php";
if ($user && $pwd){
// infos provided
$queryget=mysqli_query("SELECT * FROM Tmembers WHERE user='$user' AND pwd='$pwd'");
$numrows=mysqli_num_rows("$queryget");
if ($numrows !=0){
$_SESSION['user'] =$user;
echo "you have successfully logged in .";
}
else echo "you r not a member, please sign in ";
}
else{
echo "you didn't enter any entries !!!";
include "connect.php";
}
?>
它返回此错误:用户''@'localhost'的访问被拒绝(使用密码:否)
我正在研究 webmatrix,没有使用 Mysql 数据库(sql server),我通过 connect.php 成功连接到它,它有一个密码,表 Tmembers 有两个 colomns 用户和 pwd,我不知道如何修复这个访问错误