Rumah > Soal Jawab > teks badan
<?php
session_start();
header("Content-type:text/html;charset=utf-8");
$link = mysqli_connect('localhost','lgh'12 'etjyr2bm','123654lgh');
jika (!$link) {
die("连接失败:".mysqli_connect_error());
}
;$sql *
;$sql =" $result = mysqli_query($link, $sql);$rows = mysqli_fetch_array($result); $username = $_POST['username']; $password = $_POST ; $confirm = $_POST['confirm']; $email = $_POST['email']; if($username == "" || $password == "" || $ sahkan == "" ||. $email == "") if ((strlen($nama pengguna) < 3)||(!preg_match('/^w+$/i', $username))) { echo "<script>alert('信息不能为空!重新填写');window.location.href='zhuce.html'</script>"; } elseif($username ) < 3)||(!preg_match('/^w+$/i', $username))) { gema "<skrip>alert('用户名至少3位且不含非法!凍熙');window.location.href='zhuce'</script>"; //判断用户名长度 }elseif(strlen($password) < 5){g
< e alert('密码至少5位!重新填写');window.location.href='zhuce.html'</script>"; //判断密码长度}eif $confirm kata laluan !{
echo "<script>alert('两次密码不相同!重新填写');window.location.href='zhuce.html'</script>";
埀極慈/行是否相同 } elseif (!preg_match('/^[w.]+@w+.w+$/i', $email)) echo "<script>alert('邮箱不合法) ;window.location.href='zhuce.html'</script>"; //判断邮箱格式是否合法 elseif(mysqli_fetch_array username(mysqli_fetch_arrayelect) '"))){ echo "<script>alert('用户名已存在');window.location.href='zhuce.html'</script>"; } lain{ $ sql= "masukkan ke dalam nilai log masuk(nama pengguna, kata laluan, sahkan, e-mel)('$nama pengguna','$kata laluan','$sahkan','$e-mel')"; //插入数据库 jika(! (mysqli_query($link,$sql))){gema "<skrip>alert('Pemasukan data gagal');window.location.href='zhuce.html'";
}lain{
echo "<skrip>alert('Pendaftaran berjaya'); window.location.href='yonghu.html'</script>";
}
}
?>
kanglecheng2019-07-12 14:22:26
Ini adalah gesaan daripada pelanggan Jika anda menyerahkan borang pada halaman anda, maka anda akan melihat gesaan apabila anda menyegarkannya