注册部分: 注册步骤1: class/register_step1.php 班级通讯录-注册第一步 include "config.php"; if ($Submit){ $answers1=trim($answers1); $answers2=trim($answers2); if (!($answers1==$answer1)||!($answers2==$answer2)){ echo "回答错误!返回"; exit; } echo "回答正确,进入第二步。"; exit; } ?> 注册第一步-身份验证 请回答以下问题 1. echo $question1?> 您的回答 2. echo $question2?> 您的回答 php">Ask the administrator. HTML> Register Step 2: class/register_step2.php Address Book of Class 1, Grade 94 - Registration Step 2 if (!$answer=="right"){ include "config.php"; if ($submit){ if (!$username||!$psw||!$psw2||!$name||!$ad||!$ph| |! $ Email) {// Check whether to fill in the complete Echo "sorry, you have to fill in all the items with*! & lt; br & gt;". "& lt; a href = 'javascript: hestory.back ()' >Return"; exit; } $username=trim($username); $psw=trim($psw); $psw2=trim ($psw2); $name=trim($name); $birth=$year.'-'.$month.'-'.$day; $work=trim($work ); $ad=trim($ad); $post=trim($post); $ph=trim($ph); $bp=trim($bp); $email=trim($email); $oicq=trim($oicq); $account=strip_tags(trim($account));//Remove leading and trailing spaces and html tags $signature=strip_tags(trim($signature)); //Check whether this name has been registered$result = mysql_query("SELECT name FROM user where name='$name'",$db); if (mysql_num_rows($result)!=0){ echo "This name has already been registered! "."Refill "."Forgot your password? Ask the administrator for the password ;/a>"; exit; } //Check whether the username is used$result = mysql_query("SELECT user FROM user where user='$username'",$db );//If the number of returned columns is not 0, it means that this username is already used by someone else if (mysql_num_rows($result)!=0){ echo "This username is already used by someone else! "."Refill"; exit; } //Check whether the repeated password is correct if (!$psw==$psw2){ echo "Please confirm password,return"; exit; } //Check the validity of the emailif(!ereg('^[-!#$%&'*+./0-9=?A-Z^_`a-z{|}~] +'.'@'.'[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+.'.'[-!#$%&'*+. /0-9=?A-Z^_`a-z{|}~]+$',$email)&&$email){ echo "email is illegal!"."Refill"; exit;} //Write to database $sql="INSERT INTO user (user, psw,name,sex,birth,work,ad,post,ph,bp,email,oicq,account,signature,face) VALUES ('$username','$psw','$name','$sex', '$birth','$work','$ad','$post','$ph','$bp','$email','$oicq','$account','$signature', '$face')"; $result = mysql_query($sql,$db); mysql_close($db); //Send a congratulatory email $subject="Congratulations on your successful registration ".$sitename."! ";//Topic $message=$name.",Hello: Congratulations on your successful registration in the classmate directory! Your username is ".$username." and your password is ".$psw."Log in now$sitename";//Content of the message $headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type mail($email,$subject,$message,$headers);//When debugging offline, This sentence may be wrong, don't worry about it, just send it to the server echo "Congratulations on your successful registration! A welcome letter has been sent to your email, please check it.","现在登录"; exit; } ?> 注册第二步-填写个人资料 注意不要有空格,带*的项目为必填。 ' echo $PHP_SELF;?>?answer=right'> bordercolor="#FFCC00"> * 🎜> , The length should not exceed 8 characters) ;br> " > > < ;option>1981 ;option>1978 1977 1976 1975 1974 1973 1972 1971 1970 1969 1968 1967 1966 1965 1964 1963 1962 1961 1960 1959 1958 1957 1956 1955 1954 年 01 02 03 04 05 06 07 08 09 10 11 12 月 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 日 工作单位: 通讯地址: * 邮编: ' name='email' size='15' maxlength='35'> 12' maxlength='12'> cols='50' rows='5'> > "> Choose an avatar you like: > 32"> "32"> " height="32"> "32" height="32"> width = "32" height = "32" gif" width="32" height="32"> /HTML> http://www.bkjia.com/PHPjc/316057.htmlwww.bkjia.com truehttp: //www.bkjia.com/PHPjc/316057.htmlTechArticleRegistration part: Registration step 1: class/register_step1.php HTML HEAD meta http-equiv=Content-Type content= text/html; charset=gb2312 TITLE class address book - first step of registration/TITLE /HEAD BOD...