时间:2021-07-01 10:21:17 帮助过:12人阅读
login.html用户系统登录
dbconn.class.php
userModel.php prepare($sql);: $result->bind_param("ss",$user_id,$user_password); $user_id=$userid; $user_password=$userpwd; $result->execute();break; } case "student":{ $sql="select s_id,s_name,s_dep from stu_info where s_id=? ands_pwd=?"; $result=$mysqli->prepare($sql); $result->bind_param("ss",$user_id,$user_password); $user_id=$userid; $user_password=$userpwd; $result->execute();break; } } $result->bind_result($user_id,$user_name,$user_dep); while($result->fetch()){ $userlist=array( 'user_id'=>$user_id, 'user_name'=>$user_name, 'user_dep'=>$user_dep ); } $result->close(); $mysqli->close(); return userlist; } ?>