public function signupHandler() { $username = Util::fetch_post('username'); $password = Util::fetch_post('password'); $realname = Util::fetch_post('realname'); if ($username == null || $password == null || $realname == null) { $this->error(2); } $userTable = new UserTable(); if ($userTable->is_exist($username)) { $this->errorMsg('该用户已存在'); } // 插入数据 $userTable->insert($username, $password, $realname); $result = $userTable->select($username, $password); $userExtraTable = new UserExtraTable(); $userExtraTable->insert($result['user_id']); SQLUtil::login($username, $password); Util::go(URL . 'manager/'); }