<?php 
session_start(); //开着身份验证，以
include("../sql/conn.php"); /////写
header("Content-type: text/html; charset=utf-8"); 
$llym = $_SERVER["HTTP_REFERER"];
?>

<?php
if ($_GET['tjx']=="tjx")
{


	 $result = mysql_query("SELECT * FROM ".$b_qz."_tk_name where name ='".$_POST['name']."' ");
	 if (mysql_num_rows($result) != 0 )//检查库里是否有这个用户名
	 {
     echo "<script>alert('名称重复！');</script>";
	 }else{
	 mysql_query("INSERT INTO ".$b_qz."_tk_name (name, user, time1, bz) VALUES ('".$_POST['name']."','".$_SESSION['user_1']."','".$noww."', '".$_POST['bz']."')");
	 }

mysql_query("INSERT INTO ".$b_qz."_text (user, ip1, time1, dm, ting) VALUES ('".$_SESSION['user_1']."','".$iipp."','".$noww."', 'cj_ks_name','创建考试')");

echo "<meta http-equiv=refresh content=0.1;url=".$llym." >";
exit;
}
?>

<?php include("../sql/close.php"); /////写?>
