<?php
	$username = $_POST["username"]; 
	require_once "../comm/conn.php";
    $con = @mysql_connect("$dbserver","$dbuser","$dbpass" )or die("can not connect to the dbserver!");    
    mysql_select_db("$dbname",$con)or die("can not choose the dbname!"); 
    $query="select id from user where ddusername='".$username."';";
	mysql_query("set names gbk");
    $res=mysql_query($query);
    if(mysql_num_rows($res)==0){
		echo "<meta http-equiv='Content-Type' content='text/html; charset=gbk' /><Script language='JavaScript'> alert('不存在的用户名!请重新输入！');history.go(-1);</Script>";
	}else {
		 ?>
			<body onLoad="document.form.submit()">
			<form name="form" method="post" action="chkanswer.php"> 
				<input type="hidden" value="<?php echo $username;?>" name="username">
			</form>
			</body>
		<?php 
	}
		
?>