亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP開(kāi)發(fā)註冊(cè)頁(yè)面之初識(shí)

相信大家對(duì)於註冊(cè)頁(yè)面也不陌生,註冊(cè)頁(yè)面就是讓用戶(hù)填寫(xiě)一些信息,什麼用戶(hù)名,密碼,電子郵箱,性別等等都是在我們的註冊(cè)頁(yè)面進(jìn)行。我們今天就教大家怎麼做註冊(cè)頁(yè)面


先看一下下面的註冊(cè)頁(yè)面圖片

4.jpg

上圖就是我們比較簡(jiǎn)單的註冊(cè)頁(yè)面,比我們前面所做的登入頁(yè)面多了一個(gè)確認(rèn)密碼,是為了防止使用者兩次輸入的密碼不一樣,導(dǎo)緻密碼錯(cuò)誤,我們下章節(jié)開(kāi)始來(lái)做我們的HTML頁(yè)面


#提示:我們?yōu)榇蠹沂竟?fàn)的註冊(cè)頁(yè)面是最簡(jiǎn)單的註冊(cè)頁(yè)面,上面只有用戶(hù)名和密碼的,但在我們?nèi)粘I钣龅降脑]冊(cè)頁(yè)面,都包括什麼手機(jī)號(hào)碼,電子郵箱,什麼的,等大家熟悉了程序,相信大家可以做出豐富多彩的頁(yè)面


#創(chuàng)建我們所需的文件

#處理接收reg.html頁(yè)面?zhèn)鬟^(guò)來(lái)的數(shù)據(jù),將資料儲(chǔ)存到user資料表中
檔名reg.htmlreg.php#yanzhengma.php


##主要功能


#前臺(tái)註冊(cè)頁(yè)面


驗(yàn)證碼程式


繼續(xù)學(xué)習(xí)
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登陸界面</title> <script type="text/javascript"> function checkinput() { if($('#name').val() == ''){ alert("你的用戶(hù)名不能為空"); $('#name').focus(); return false; } if($('#pwd').val() == ''){ alert("你的密碼不能為空"); $('#pwd').focus(); return false; } if($('#pwd').val() != $('#pwdconfirm').val()){ alert("你輸入的兩次密碼不一致,請(qǐng)重新輸入!"); $('#pwd').focus(); return false; } if($('#yzm').val() == ''){ alert("你的驗(yàn)證碼不能為空"); $('#yzm').focus(); return false; } } </script> <style type="text/css"> body{background-color: rgba(223, 255, 231, 0.28) } .container{ border-radius: 25px; box-shadow: 0 0 20px #222; width: 380px; height: 400px; margin: 0 auto; margin-top: 200px; background-color: rgba(152, 242, 242, 0.23); } input{ width: 180px; height: 25px; } button{ background-color: rgba(230, 228, 236, 0.93); border: none; color: #110c0f; padding: 10px 70px; text-align: center; display: inline-block; font-size: 16px; cursor: pointer; margin-top: 30px; margin-left: 50px; } div.right { position: relative; left: 40px; top: 20px; } </style> </head> <body> <form action="" method="post" onsubmit=" return checkinput();" > <div class="container"> <div class="right"> <h2>用戶(hù)注冊(cè)</h2> <p>用 戶(hù) 名:<input type="text" name="name" id="name"></p> <p>密  碼: <input type="password" name="pwd" id="pwd"></p> <p>確認(rèn)密碼: <input type="password" name="pwdconfirm" id="pwdconfirm"></p> <p>驗(yàn) 證 碼:<input type="text" name="yzm" id="yzm"> <img src="yanzhengma.php" onClick="this.src='yanzhengma.php?nocache='+Math.random()" style="cursor:hand"></p> <p><button type="submit" value="注冊(cè)" >立即注冊(cè)</button></p> </div> </div> </form> </body> </html>
提交重置程式碼