( ! ) Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\Zend\mall\register.php on line 50Call Stack#TimeMemoryFunctionLocation10.0006253408{main}( )..\register.php:020.0024262832mysqli_query ( )..\register.php:50( ! ) Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, null given in D:\Zend\mall\register.php on line 51Call Stack#TimeMemoryFunctionLocation10.0006253408{main}( )..\register.php:020.0045263440mysqli_fetch_assoc ( )..\register.php:51<?phpif (!empty($_POST['username'])){// include_once './lib/fun.php'; $username=trim($_POST['username']); $password=trim($_POST['password']); $repassword=trim($_POST['repassword']); if(!$username) { echo '用户名不能为空'; exit; } if(!$password) { echo '密码不能为空'; exit; } if(!$repassword) { echo '确认密码不能为空'; exit; } if($password!==$repassword) { echo '两次输入密码不一致,请重新输入'; exit; } $con= mysqli_connect('127.0.0.1','root','123456','imooc_mall'); if(!$con) { echo mysql_error(); exit; }}; //判断用户是否在数据表存在 $sql="SELECT COUNT('id') FROM `im_user` WHERE 'username'='{$username}'"; $obj=mysqli_query($sql); $result=mysqli_fetch_assoc($obj); var_dump($result);die;
添加回答
举报
0/150
提交
取消