標題:
有關會員註冊
[打印本頁]
作者:
s3758649
時間:
2017-4-10 21:31
標題:
有關會員註冊
大家好
以下是我練習寫出來的會員註冊頁面
可是我不知道該在哪邊加上驗證的方法
可以麻煩大家幫助我嗎?
以下是程式碼
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="zh-TW">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="assets/css/main.css" />
<title>會員註冊</title>
</head>
<style>
form {
border:#aaa solid 1px;
margin:20px auto;
padding:30px;
width:500px;
}
p.danger{
color:red;
text-align:center;
}
</style>
<body>
<?php
if(isset($_SESSION['is_login']) && $_SESSION['is_login'] == TRUE):
header('Location: backend.php');
?>
<?php else:?>
<form method="post" action="login_check.php">
<div class="col-xs-12 col-sm-4 col-sm-offset-4">
<form class="register" method="post" action="php/add_member.php">
<font>
        <b><font size="5"><font color="green">會員註冊:</font></font></b>
<class=out1 style='-height:60px'>
</font>
<div class="form-group">
<div class=out1 style='-height:40px'>
        <label for="username">名稱:          </label>
<input type="text" class="form-control" id="username" name="username" placeholder="" required>
</div>
</div>
<div class="form-group">
<div class=out1 style='-height:40px'>
        <label for="username">帳號:          </label>
<input type="text" class="form-control" id="username" name="username" placeholder="" required>
</div>
</div>
<div class="form-group">
<div class=out1 style=' -height:40px'>
        <label for="password">密碼:          </label>
<input type="password" class="form-control" id="password" name="password" placeholder="" required>
</div>
</div>
<div class="form-group">
<div class=out1 style='-height:40px'>
<label for="confirm_password">再次輸入密碼:  </label>
<input type="password" class="form-control" id="confirm_password" name="password" placeholder="" required>
</div>
</div>
<div class=out1 style='-height:40px'>
<div class="4u 12u$(small)">
<B>性別:<B>
<br>
<input type="radio" id="Male" name="sex">
<label for="Male">男</label>
<input type="radio" id="Female" name="sex">
<label for="Female">女</label>
</div>
<div class="form-group">
<div class=out1 style='-height:40px'>
    <label for="name">電話號碼:      </label>
<input type="text" class="form-control" id="name" name="name" placeholder="" required>
</div>
</div>
<div class="form-group">
<div class=out1 style='-height:40px'>
    <label for="name">電子信箱:      </label>
<input type="text" class="form-control" id="name" name="name" placeholder="" required>
</div>
</div>
<br>
<div class="12u 12u$(small)">
<input type="checkbox" id="rule" name="rule">
<label for="rule">
<font face="DFKai-sb" font size="4" font color="green" >我同意本網站服務條款和隱私權條款</font></label>
<div class=out1 style='text-align:center; -height:40px'>
<button type="submit"><span>送出</button></span>
</div>
</form>
<?php endif;?>
</body>
</html>
謝謝大家!!!
歡迎光臨 麻辣家族討論版版 (http://forum.twbts.com/)