时间:2021-07-01 10:21:17 帮助过:20人阅读
$.post('{:U("Register/register")}', $('#register'), function(str) { // .serialize()
//注册
public function register() {
$data['u_username'] = strtolower(I('name', '', 'trim'));
$data['u_phone'] = I('phone', '', 'trim');
$data['u_email'] = I('email', '', 'trim');
$data['u_password'] = I('pass');
$data['repassword'] = I('rpass');
$rpass = I('rpass');
... ...
if (email === 0 || phone === 0 || code === 0 || username === 0 || password === 0 || rpassword === 0) {
...
if (document.getElementById("email").value === 0 || document.getElementById("phone").value === 0 || document.getElementById("code").value === 0 || document.getElementById("username").value === 0 || document.getElementById("password").value === 0 || document.getElementById("rpassword").value === 0) {