国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

PHP開發(fā)注冊頁面之初識

相信大家對于注冊頁面也不陌生,注冊頁面就是讓用戶填寫一些信息,什么用戶名,密碼,電子郵箱,性別等等都是在我們的注冊頁面進行。我們今天就教大家怎么做注冊頁面


先看一下下面的注冊頁面圖

4.jpg

上圖就是我們一個比較簡單的注冊頁面,比我們前面所做的登錄頁面多了一個確認密碼,是為了防止用戶兩次輸入的密碼不一樣,導(dǎo)致密碼錯誤,我們下章節(jié)開始來做我們的HTML頁面


提示:我們?yōu)榇蠹已菔镜淖皂撁媸亲詈唵蔚淖皂撁?,上面只有用戶名和密碼的,但在我們?nèi)粘I钣龅降淖皂撁?,都包括什么手機號碼,電子郵箱,什么的,等大家熟悉了程序,相信大家可以做出豐富多彩的頁面


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

文件名reg.htmlreg.phpyanzhengma.php


主要功能


前臺注冊頁面

處理接收reg.html頁面?zhèn)鬟^來的數(shù)據(jù),將數(shù)據(jù)保存到user數(shù)據(jù)表中


驗證碼程序


繼續(xù)學習
||
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>登陸界面</title> <script type="text/javascript"> function checkinput() { if($('#name').val() == ''){ alert("你的用戶名不能為空"); $('#name').focus(); return false; } if($('#pwd').val() == ''){ alert("你的密碼不能為空"); $('#pwd').focus(); return false; } if($('#pwd').val() != $('#pwdconfirm').val()){ alert("你輸入的兩次密碼不一致,請重新輸入!"); $('#pwd').focus(); return false; } if($('#yzm').val() == ''){ alert("你的驗證碼不能為空"); $('#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>用戶注冊</h2> <p>用 戶 名:<input type="text" name="name" id="name"></p> <p>密  碼: <input type="password" name="pwd" id="pwd"></p> <p>確認密碼: <input type="password" name="pwdconfirm" id="pwdconfirm"></p> <p>驗 證 碼:<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="注冊" >立即注冊</button></p> </div> </div> </form> </body> </html>
提交重置代碼