Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\wamp64\www\SET1\login.php on line 8 |
---|
Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in D:\wamp64\www\SET1\login.php on line 9 |
---|
代码如下
<?php
include_once("php/common.php");
$userName = $_POST['userName'];
// $password = $_POST['password'];
$userName = addslashes($_POST['userName']);
$password = addslashes($_POST['password']);
$loginSQL = "select * from users where userName='$userName' and password='$password'";
$resultLogin = mysqli_query($loginSQL);
if (mysqli_num_rows($resultLogin) > 0) {
echo "登录成功";
header("Location:../manage.php");
} else {
echo "登录失败";
}
?>
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。