📄 uptable.php
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<?php
require "conn.php";
$name=trim($_POST['name']);
$sex=trim($_POST['sex']);
$xueyuan=trim($_POST['xueyuan']);
$banji=trim($_POST['banji']);
$phone=trim($_POST['phone']);
$address=trim($_POST['address']);
$email=trim($_POST['email']);
$bumen=trim($_POST['bumen']);
$beizhu=trim($_POST['beizhu']);
$conn=mysql_connect($host_name,$db_user,$db_pass);
mysql_query("set names utf8;");
mysql_select_db('xshbm');
$sql="select * from xshbm where phone=$phone;";
$result=mysql_query($sql);
$num=mysql_num_rows($result);
if($num){
$row=@mysql_fetch_array($result);
if($name==$row[1]){
echo "<script language=javascript>
alert('浣犲凡缁忓~鎶ヨ繃浜嗭紝璋㈣阿鍏虫敞!');
location.href='http://xsh.gxun.edu.cn';
</script>";
exit;
}
}
else{
mysql_select_db('xshbm');
$sql2="insert into xshbm values(NULL,'$name','$sex','$xueyuan','$banji','$phone','$address','$email','$bumen','$beizhu',now())";
mysql_query($sql2);
echo "<script>alert('鎻愪氦鎴愬姛锛屾垜浠
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -