//注册用户
public function register(){
// $userID = 'admin3';
// $userPwd = '123456';
// $userTel = '111';
$userID = isset($_POST['name']) ? $_POST['name'] : '';
$userPwd = isset($_POST['password']) ? md5($_POST['password']) : '';
$userTel = isset($_POST['tel']) ? $_POST['tel']:'';
if(!empty($userID)&&!empty($userPwd)&&!empty($userTel)){
$sql = "select count(id) as num from userInfo where userTel='{$userTel}' or userID='{$userID}'";
$num = $this->db->fetchRow($sql);
//根据不同的返回结果,对其进行相应的响应
if ($num['num']==0) {
$sql = "insert into userInfo (userID,userPwd,userTel) values ('{$userID}','{$userPwd}','
PHP 写 APP 登录验证token接口 及 注册
最新推荐文章于 2023-05-17 15:15:07 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)