📄 zc_ok.php
字号:
<?php session_start();include "../conn.php";include "../function.php";$furl=getenv("HTTP_REFERER");?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<?php
if($qrtj=="确认提交"){
$username=htmlspecialchars($zc_username);
$username=ereg_replace(' ','',$username);
$password=htmlspecialchars($zc_password);
$password=ereg_replace(' ','',$password);
$key = htmlspecialchars($username);
$txt = htmlspecialchars($password);
$query="select * from hw_yh where username='$username'";
$result=mysql_query($query);
if(mysql_num_rows($result)>0){
echo $zc_username."已经被注册!</font>";
echo "<meta http-equiv=\"Refresh\" content=\"3;url=$furl\">3秒钟转入注册页,请稍等...";
}else{
$password=encrypt($txt,$key);
$password=str_replace("'","$username",$password);
$tp="../image/tx/".$_POST[head]=$head;
$query="insert into hw_yh (username,zsxm,password,sex,birthday,phone,qq,head,email,grzy,lxdz)values
('$username','$zsxm','$password','$sex','$birthday','$phone','$qq','$head','$email','$grzy','$lxdz')";
$result=mysql_query($query);
if($result){
session_register(username);
session_register(password);
echo "<font class=\"red\">您注册的信息如下!</font><br>";
echo "<li class=\"huise03\">用户名:<font color=red>".$username."<br>";
echo "<li class=\"huise03\">E-Mail:<font color=red>".$email."<br>";
echo "<li class=\"huise03\"><font color=red>".$zc_username."</font>恭喜您注册成功!";
echo "<meta http-equiv=\"Refresh\" content=\"3;url=../index.php\">5秒钟转入主页,请稍等...";
}else{
echo mysql_error();
echo "<font class='#ff0000'>注册失败!!!</font>";
}
}
}
?>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -