Class address book -The first step of registration

Home  >  Article  >  Backend Development  >  Classmate Xinglin’s Record 6

Classmate Xinglin’s Record 6

WBOY
WBOYOriginal
2016-07-29 08:33:50888browse

注册部分:
   注册步骤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.

          您的回答  
          
          

          2.

          您的回答  
          
          

          
          
        

                       
                                                                                           Bar.

                            

.php



94 Class 1 Address Book - Registration Step 2< ;/Title & gt; <br> & lt;/head & gt; <br> & lt; body bgcolor = "#ffffff" & gt; <br> & lt;? PHP <br>IF (! $ Answer == "Right" ") Ingenious ! "; <br>exit; <br>} <br>include "config.php"; <br>if ($submit){ <br> if (!$username||!$psw||!$psw2||!$name||!$ad|| ! $ PH ||! $ Email) {// Check whether to fill in the complete <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br> <br>!!!!!!!! You must fill in all the projects with*! & lt; br & gt; "." & lt; a & gt; return & lt;/a & gt; " ; <br>         exit; <br>   } <br> $username=trim($username); <br> $psw=trim($psw); <br> $psw2=trim($psw2); <br> $name=trim($name); <br> $birth= $year.'-'.$month.'-'.$day; <br> $work=trim($work); <br> $ad=trim($ad); <br> $post=trim($post); <br> $ph =trim($ph); <br> $bp=trim($bp); <br> $email=trim($email); <br> $oicq=trim($oicq); <br> $account=strip_tags(trim($account)); //Remove leading and trailing spaces and html tags<br> $signature=strip_tags(trim($signature)); <br>//Check whether this name has been registered<br>$result = mysql_query("SELECT name FROM user where name='$name'" ,$db); <br>if (mysql_num_rows($result)!=0){ <br>echo "This name has already been registered! "."<a >Refill</a> "."Forgot your password? Ask the administrator for password<a href='querypsw.php'></a>"; <br>exit; <br>} <br>//Check whether the username is used<br>$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 already exists. Use <br>if (mysql_num_rows($result)!=0){ <br>echo "This username is already used! "."<a >Refill</a>"; <br>exit; <br>} <br>//Check whether the repeated password is correct<br>if (!$psw==$psw2){ <br> echo "Please confirm the password,< ;a >Return</a>"; <br> exit; <br>} <br>//Check the validity of the email<br>if(!ereg('^[-!#$%&'*+./0-9=? A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+.'.'[ -!#$%&'*+./0-9=?A-Z^_`a-z{|}~]+$',$email)&&$email){ <br>    echo "email is illegal!<BR>" ."<a >Refill</a><BR>"; <br>                                                                                                                                             ,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')"; <br> $ result = mysql_query($sql,$db); <br> mysql_close($db); <br> //Send a congratulatory email<br> $subject="Congratulations on your successful registration".$sitename."! ";//Topic <br> $message=$name.",Hello: <BR> Congratulations on your successful registration in the classmate directory! Your username is ".$username." and your password is ".$psw."<BR>Log in now<a href='$url'>$sitename</a>";//Content of the letter<br> $headers .= "Content-Type: text/html; charset=gb2312n"; // Mime type <br> mail($email,$subject,$message,$headers);//When debugging offline, this sentence may If something goes wrong, don't worry about it, just send it to the server <br> echo "Congratulations on your successful registration! A welcome letter has been sent to your email, please check it.","<a href='../index.php'>现在登录</a>";  <br> exit; <br>}  <br>?> <br><table width='95%' border='0' cellspacing='0' cellpadding='0' align='center'> <br>  <tr>  <br>    <td colspan="2">  <br>      <div align="center"><img src="image/classlogo.gif" width="224" height="60"></div> <br>    </td> <br>  </tr> <br>  <tr>  <br>    <td>  <br>      <div align="center">注册第二步-填写个人资料<br> <br>        注意不要有空格,带*的项目为必填。</div> <br>                                                                                                                  ;?answer=right'> <br>                                                                                                                     ; <br>                <td height="153" width="60%"><br> <br>                                                                                                                                                     > <br>                   *                                    ='8' maxlength=' 8'> <br>  'psw2' size=' 8' maxlength='8'> <br>                                                                                                                                            t; <br>         Gender: Male <br>                                                                                                                                                                                                                                                                      <br>        < ;br> <br>                                                                                                                     0</option> <br>                                                                               ;option>1988</option> <br>                                                                          >1985</option> <br>                                                                       ;option>1983</option> <br>                                                                       >1980</option> <br>                                                                        ;option>1978</option> <br>            <option>1977</option> <br>            <option>1976</option> <br>            <option>1975</option> <br>            <option>1974</option> <br>            <option>1973</option> <br>            <option>1972</option> <br>            <option>1971</option> <br>            <option>1970</option> <br>            <option>1969</option> <br>            <option>1968</option> <br>            <option>1967</option> <br>            <option>1966</option> <br>            <option>1965</option> <br>            <option>1964</option> <br>            <option>1963</option> <br>            <option>1962</option> <br>            <option>1961</option> <br>            <option>1960</option> <br>            <option>1959</option> <br>            <option>1958</option> <br>            <option>1957</option> <br>            <option>1956</option> <br>            <option>1955</option> <br>            <option>1954</option> <br>          </select> <br>          年  <br>          <select name='month'> <br>            <option selected>01</option> <br>            <option>02</option> <br>            <option>03</option> <br>            <option>04</option> <br>            <option>05</option> <br>            <option>06</option> <br>            <option>07</option> <br>            <option>08</option> <br>            <option>09</option> <br>            <option>10</option> <br>            <option>11</option> <br>            <option>12</option> <br>          </select> <br>          月  <br>          <select name='day'> <br>            <option selected>01</option> <br>            <option>02</option> <br>            <option>03</option> <br>            <option>04</option> <br>            <option>05</option> <br>            <option>06</option> <br>            <option>07</option> <br>            <option>08</option> <br>            <option>09</option> <br>            <option>10</option> <br>            <option>11</option> <br>            <option>12</option> <br>            <option>13</option> <br>            <option>14</option> <br>            <option>15</option> <br>            <option>16</option> <br>            <option>17</option> <br>            <option>18</option> <br>            <option>19</option> <br>            <option>20</option> <br>            <option>21</option> <br>            <option>22</option> <br>            <option>23</option> <br>            <option>24</option> <br>            <option>25</option> <br>            <option>26</option> <br>            <option>27</option> <br>            <option>28</option> <br>            <option>29</option> <br>            <option>30</option> <br>            <option>31</option> <br>          </select> <br>          日<br> <br>          工作单位:  <br>          <input type='Text' name='work' size='30' maxlength='50'> <br>          <br> <br>          通讯地址:  <br>          <input type='Text' name='ad' size='30' maxlength='50'> <br>          *<br> <br>          邮编:  <br>          <input type='Text' name='post' size='6' maxlength='6'> <br><br> <br>                                                                                                             <input type='Text ' name='bp' size='15' maxlength='20'> <br>                                                                                                                                                                    > <br> Personal description: (In address book Displayed here, no more than 125 Chinese characters) Automatic signature of guestbook, no more than 125 Chinese characters)<br> <br>                                    < ;td height="153" width="40%"><br> <br>                                                Choose an avatar you like:<br> " height = "32" ="32"> <br>                                                                    32"> > <br>                                                                                                                                                   ;input type="radio" name="face" value="6"> <br>                                                                      type="radio" name="face" value="7"> <br>                                                                        <input type="radio" name="face" value="8"> <br>          <img src="image/face/icon9.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="9"> <br>          <img src="image/face/icon10.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="10"> <br>              <img src="image/face/icon11.gif" width="32" height="32">  <br>              <input type="radio" name="face" value="11"> <br>          <img src="image/face/icon12.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="12"> <br>          <img src="image/face/icon13.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="13"> <br>          <img src="image/face/icon14.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="14"> <br>          <img src="image/face/icon15.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="15"> <br>          <img src="image/face/icon16.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="16"> <br>          <img src="image/face/icon17.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="17"> <br>          <img src="image/face/icon18.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="18"> <br>          <img src="image/face/icon19.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="19"> <br>          <img src="image/face/icon20.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="20"> <br>          <br> <br>          <img src="image/face/icon21.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="21"> <br>          <img src="image/face/icon22.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="22"> <br>          <img src="image/face/icon23.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="23"> <br>          <img src="image/face/icon24.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="24"> <br>          <img src="image/face/icon25.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="25"> <br>          <img src="image/face/icon26.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="26"> <br>          <img src="image/face/icon27.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="27"> <br>          <img src="image/face/icon28.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="28"> <br>          <img src="image/face/icon29.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="29"> <br>          <img src="image/face/icon30.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="30"> <br>          <img src="image/face/icon31.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="31"> <br>          <img src="image/face/icon32.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="32"> <br>          <img src="image/face/icon33.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="33"> <br>          <img src="image/face/icon34.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="34"> <br>          <img src="image/face/icon35.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="35"> <br>          <img src="image/face/icon36.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="36"> <br>          <img src="image/face/icon37.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="37"> <br>          <img src="image/face/icon38.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="38"> <br>          <img src="image/face/icon39.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="39"> <br>          <img src="image/face/icon40.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="40"> <br>          <br> <br>          <img src="image/face/icon41.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="41"> <br>          <img src="image/face/icon42.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="42"> <br>          <img src="image/face/icon43.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="43"> <br>          <img src="image/face/icon44.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="44"> <br>          <img src="image/face/icon45.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="45"> <br>          <img src="image/face/icon46.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="46"> <br>          <img src="image/face/icon47.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="47"> <br>          <img src="image/face/icon48.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="48"> <br>          <img src="image/face/icon49.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="49"> <br>          <img src="image/face/icon50.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="50"> <br>              <img src="image/face/icon51.gif" width="32" height="32">  <br>              <input type="radio" name="face" value="51"> <br>          <img src="image/face/icon52.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="52"> <br>          <img src="image/face/icon53.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="53"> <br>          <img src="image/face/icon54.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="54"> <br>          <img src="image/face/icon55.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="55"> <br>          <img src="image/face/icon56.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="56"> <br>          <img src="image/face/icon57.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="57"> <br>          <img src="image/face/icon58.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="58"> <br>          <img src="image/face/icon59.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="59"> <br>          <img src="image/face/icon60.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="60"> <br>          <br> <br>          <img src="image/face/icon61.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="61"> <br>          <img src="image/face/icon62.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="62"> <br>          <img src="image/face/icon63.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="63"> <br>          <img src="image/face/icon64.gif" width="32" height="32">  <br>          <input type="radio" name="face" value="64"> <br>          <br> <br>            </td> <br>          </tr> <br>        </table> <br>        <div align="center"> <br>          <br> <br>          <input type='Submit' name='submit' value='提交'> <br>          <input type='reset' name='Reset' value='重写 '> <br>                                                                                                   <br> The above has introduced Xinglin Classmate Record 6, including various aspects. I hope it will be helpful to friends who are interested in PHP tutorials. <br> <br> <br></p></div><div class="nphpQianMsg"><div class="clear"></div></div><div class="nphpQianSheng"><span>Statement:</span><div>The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn</div></div></div><div class="nphpSytBox"><span>Previous article:<a class="dBlack" title="import text to mysql how to import data from text to mysql" href="http://m.php.cn/faq/320936.html">import text to mysql how to import data from text to mysql</a></span><span>Next article:<a class="dBlack" title="import text to mysql how to import data from text to mysql" href="http://m.php.cn/faq/320939.html">import text to mysql how to import data from text to mysql</a></span></div><div class="nphpSytBox2"><div class="nphpZbktTitle"><h2>Related articles</h2><em><a href="http://m.php.cn/article.html" class="bBlack"><i>See more</i><b></b></a></em><div class="clear"></div></div><ins class="adsbygoogle" style="display:block" data-ad-format="fluid" data-ad-layout-key="-6t+ed+2i-1n-4w" data-ad-client="ca-pub-5902227090019525" data-ad-slot="8966999616"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><ul class="nphpXgwzList"><li><b></b><a href="http://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/1.html" title="How to use cURL to implement Get and Post requests in PHP" class="aBlack">How to use cURL to implement Get and Post requests in PHP</a><div class="clear"></div></li><li><b></b><a href="http://m.php.cn/faq/2.html" title="All expression symbols in regular expressions (summary)" class="aBlack">All expression symbols in regular expressions (summary)</a><div class="clear"></div></li></ul></div></div><ins class="adsbygoogle" style="display:block" data-ad-format="autorelaxed" data-ad-client="ca-pub-5902227090019525" data-ad-slot="5027754603"></ins><script> (adsbygoogle = window.adsbygoogle || []).push({}); </script><div class="nphpFoot"><div class="nphpFootBg"><ul class="nphpFootMenu"><li><a href="http://m.php.cn/"><b class="icon1"></b><p>Home</p></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><p>Course</p></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><p>Q&A</p></a></li><li><a href="http://m.php.cn/login"><b class="icon5"></b><p>My</p></a></li><div class="clear"></div></ul></div></div><div class="nphpYouBox" style="display: none;"><div class="nphpYouBg"><div class="nphpYouTitle"><span onclick="$('.nphpYouBox').hide()"></span><a href="http://m.php.cn/"></a><div class="clear"></div></div><ul class="nphpYouList"><li><a href="http://m.php.cn/"><b class="icon1"></b><span>Home</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course.html"><b class="icon2"></b><span>Course</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/article.html"><b class="icon3"></b><span>Article</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/wenda.html"><b class="icon4"></b><span>Q&A</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/dic.html"><b class="icon6"></b><span>Dictionary</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/course/type/99.html"><b class="icon7"></b><span>Manual</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/xiazai/"><b class="icon8"></b><span>Download</span><div class="clear"></div></a></li><li><a href="http://m.php.cn/faq/zt" title="Topic"><b class="icon12"></b><span>Topic</span><div class="clear"></div></a></li><div class="clear"></div></ul></div></div><div class="nphpDing" style="display: none;"><div class="nphpDinglogo"><a href="http://m.php.cn/"></a></div><div class="nphpNavIn1"><div class="swiper-container nphpNavSwiper1"><div class="swiper-wrapper"><div class="swiper-slide"><a href="http://m.php.cn/" >Home</a></div><div class="swiper-slide"><a href="http://m.php.cn/article.html" class="hover">Article</a></div><div class="swiper-slide"><a href="http://m.php.cn/wenda.html" >Q&A</a></div><div class="swiper-slide"><a href="http://m.php.cn/course.html" >Course</a></div><div class="swiper-slide"><a href="http://m.php.cn/faq/zt" >Topic</a></div><div class="swiper-slide"><a href="http://m.php.cn/xiazai" >Download</a></div><div class="swiper-slide"><a href="http://m.php.cn/game" >Game</a></div><div class="swiper-slide"><a href="http://m.php.cn/dic.html" >Dictionary</a></div><div class="clear"></div></div></div><div class="langadivs" ><a href="javascript:;" class="bg4 bglanguage"></a><div class="langadiv" ><a onclick="javascript:setlang('zh-cn');" class="language course-right-orders chooselan " href="javascript:;"><span>简体中文</span><span>(ZH-CN)</span></a><a onclick="javascript:;" class="language course-right-orders chooselan chooselanguage" href="javascript:;"><span>English</span><span>(EN)</span></a><a onclick="javascript:setlang('zh-tw');" class="language course-right-orders chooselan " href="javascript:;"><span>繁体中文</span><span>(ZH-TW)</span></a><a onclick="javascript:setlang('ja');" class="language course-right-orders chooselan " href="javascript:;"><span>日本語</span><span>(JA)</span></a><a onclick="javascript:setlang('ko');" class="language course-right-orders chooselan " href="javascript:;"><span>한국어</span><span>(KO)</span></a><a onclick="javascript:setlang('ms');" class="language course-right-orders chooselan " href="javascript:;"><span>Melayu</span><span>(MS)</span></a><a onclick="javascript:setlang('fr');" class="language course-right-orders chooselan " href="javascript:;"><span>Français</span><span>(FR)</span></a><a onclick="javascript:setlang('de');" class="language course-right-orders chooselan " href="javascript:;"><span>Deutsch</span><span>(DE)</span></a></div></div><script> var swiper = new Swiper('.nphpNavSwiper1', { slidesPerView : 'auto', observer: true,//修改swiper自己或子元素时,自动初始化swiper observeParents: true,//修改swiper的父元素时,自动初始化swiper }); </script></div></div><!--顶部导航 end--><script>isLogin = 0;</script><script type="text/javascript" src="/static/layui/layui.js"></script><script type="text/javascript" src="/static/js/global.js?4.9.47"></script></div><script src="https://vdse.bdstatic.com//search-video.v1.min.js"></script><link rel='stylesheet' id='_main-css' href='/static/css/viewer.min.css' type='text/css' media='all'/><script type='text/javascript' src='/static/js/viewer.min.js?1'></script><script type='text/javascript' src='/static/js/jquery-viewer.min.js'></script><script>jQuery.fn.wait = function (func, times, interval) { var _times = times || -1, //100次 _interval = interval || 20, //20毫秒每次 _self = this, _selector = this.selector, //选择器 _iIntervalID; //定时器id if( this.length ){ //如果已经获取到了,就直接执行函数 func && func.call(this); } else { _iIntervalID = setInterval(function() { if(!_times) { //是0就退出 clearInterval(_iIntervalID); } _times <= 0 || _times--; //如果是正数就 -- _self = $(_selector); //再次选择 if( _self.length ) { //判断是否取到 func && func.call(_self); clearInterval(_iIntervalID); } }, _interval); } return this; } $("table.syntaxhighlighter").wait(function() { $('table.syntaxhighlighter').append("<p class='cnblogs_code_footer'><span class='cnblogs_code_footer_icon'></span></p>"); }); $(document).on("click", ".cnblogs_code_footer",function(){ $(this).parents('table.syntaxhighlighter').css('display','inline-table');$(this).hide(); }); $('.nphpQianCont').viewer({navbar:true,title:false,toolbar:false,movable:false,viewed:function(){$('img').click(function(){$('.viewer-close').trigger('click');});}}); </script></body></html>