warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boole
<?php$conn=mysqli_connect("localhost","root","","kaohe");//检测连接if(mysqli_connect_errn...
<?php
$conn=mysqli_connect("localhost","root","","kaohe");
// 检测连接
if (mysqli_connect_errno())
{
echo "连接失败: " . mysqli_connect_error();
}
$result = mysqli_query($conn,"SELECT * FROM tests
WHERE LIKE username=$_POST[username]");
while($row = mysqli_fetch_array($result))
{
echo $row['username'] . "" . $row['password'];
echo "<br>";
}
?>
怎么实现输入一个用户名,然后查询该用户的信息。我的代码哪里出错了?求助
如果我的数据表有用户名跟密码,我要怎么通过输入用户名去实现查询这个用户名跟密码呢?代码要怎么敲,求大神 展开
$conn=mysqli_connect("localhost","root","","kaohe");
// 检测连接
if (mysqli_connect_errno())
{
echo "连接失败: " . mysqli_connect_error();
}
$result = mysqli_query($conn,"SELECT * FROM tests
WHERE LIKE username=$_POST[username]");
while($row = mysqli_fetch_array($result))
{
echo $row['username'] . "" . $row['password'];
echo "<br>";
}
?>
怎么实现输入一个用户名,然后查询该用户的信息。我的代码哪里出错了?求助
如果我的数据表有用户名跟密码,我要怎么通过输入用户名去实现查询这个用户名跟密码呢?代码要怎么敲,求大神 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |