PHP if(!empty($_POST["bt_submit"]) &;&; $_POST["bt_submit"]==" ") {// set database server access variables: $host="localhost";$user="root"; $pass="123456";$db="163blog"; // open connection $connection=mysql_pconnect ($host,$user,$pass) or die ("unable to connect!") // select database mysql_select_db($db) or die ("unable to select database!"); @mysql_query("SET NAME utf8"); // creat query $users_name = $_POST ["txt_username"]; $users_sex = $_POST ["rad_sex"]; $users_birthday = $_POST ["txt_birthday"]."-".$_POST ["sel_month"]."-".$_POST["sel_day"]; $users_pwdquestion = $_POST ["sel_question"]; $users_answer = $_POST ["txt_answer"];$users_realname = $_POST ["txt_realname"]; $users_nickname = $_POST ["txt_nickname"]; $users_phone = $_POST ["txt_phone"]; $users_email = $_POST ["txt_email"];$users_logintime = date("Y-md H:i:s",time()); $users_password = md5 ($_POST["txt_password"]);$users_statetype = "1"; // $query="SELECT * FROM users where users_name = '$users_name';"; $result=mysql_query($query) or die ("error in query: $query.".
mysql_error()); if (mysql_num_rows($result)!=0) {echo ";"; echo ";";} else{$query="INSERT INTO ` 163blog`.`users`( `users_name`,`users_sex`, `users_birthday`,`users_pwdquestion`, `users_answer`, `users_realname`, `users_nickname`,`users_phone`, `users_email`,`users_logintime`, `users_passwo rd`, `users_statetype`) VALUES ('$users_name','$users_sex','$users_birthda y','$users_pwdquestion','$users_answer','$u
sers_realna me','$users_nickname','$users_phone','$user s_email','$users_logintime','$users_passwor d','$users_ statetype');"; $result=mysql_query($query) or die ("error in query: $query. ".my
sql_error()); if ($result) { echo ""; echo " function CheckRegisterInput() {if (document.registerform.txt_username.value== "") 1 PHP {alert(" !"); document.registerform.txt_username.focus(); return false;} if (document.registerform.txt_password.value.l ength==0) {alert(" "); document.registerform.txt_password.focus(); return false;} if ((document.registerform.txt_password.value. length<6) || (document.registerform.txt_password.value.l ength>18)) {alert(" 6-18 ! "); document.registerform.txt_password.focus (); return false;} if (document.registerform.txt_passwordrepeat.v alue.length==0) {alert(" "); document.registerform.txt_pass
wordrepeat.fo cus(); return false;} if (document.registerform.txt_passwordrepeat.v alue! =document.registerform.txt_password.value) {alert(" "); document.registerform.txt_passwordrepeat.fo cus();
document.registerform.txt_passwordrepeat.va lue=""; return false;} if (document.registerform.txt_birthday.value.l ength==0) {alert(" "); document.registerform.txt_birthday.focus(); return false;} if (document.registerform.txt_birthday.value <1900 || document.registerform.txt_birthday.value> 2010) {alert(" 1900-2010 "); document.registerform.txt_birthday.focus(); document.registerform.txt_birthday.value="" ; require"config/function.php"; if(!empty ($_POST['btnsave']) &;&; trim($_POST ['btnsave'])==" ") {$postusername=