php用户注册登录系统之登录注册页面

登录页面

代码如下:

<!DOCTYPE html>
<html>
 <head>
 <title>php.cn</title>
 <meta charset="utf-8" />
    <style>
         .box{
             width:240px;
             height:90px;
             background:#f0f0f0;
         }
    </style>
 </head>
 <body>
     <!-- 登录界面  login.php-->
     <div class="box">
         <form action="logincheck.php" method="post"> 
             <table>
                <tr>
                    <td align="right">用户名:</td>
                    <td><input type="text" name="username" value="请输入用户名" maxLength="6"/></td>
                </tr>
                <tr>
                    <td align="right">密 码:</td>
                    <td><input type="password" name="userpwd"  maxLength="6"/></td>
                </tr>
                <tr>
                    <td><input type="submit" name="submit" value="登陆" /> </td>
                    <td><a href="register.php">注册</a></td>
                </tr>
             </table>
         </form>
     <div>
 </body>
</html>

代码解释:

  • 由一个form表单组成

  • 采用post方式进行提交

  • 提交给登录处理界面

  • 点击注册,跳转到注册界面


注册页面

代码如下:

<!DOCTYPE html>
<html>
 <head>
 <title>php.cn</title>
 <meta charset="utf-8" />
 <style>
         .box{
             width:250px;
             height:120px;
             background:#f0f0f0;
         }
    </style>
 </head>
 <body>
     <!-- 注册界面  register.php-->
      <div class="box">
        <form action="regcheck.php" method="post"> 
            <table>
                <tr>
                    <td align="right">用户名:</td>
                    <td><input type="text" name="username" value="请输入用户名" maxLength="6"/></td>
                </tr>
                <tr>
                    <td align="right">密 码:</td>
                    <td><input type="password" name="userpwd"  maxLength="6"/></td>
                </tr>
                <tr>
                    <td align="right">确认密码:</td>
                    <td><input type="password" name="confirm"  maxLength="6"/></td>
                </tr>
                <tr>
                    <td colspa="2" align="right"><input type="Submit" name="Submit" value="注册"/></td>
                </tr>
             </table>
        </form>
    </div>   
 </body>
</html>

代码解释:

  • 由一个form表单组成

  • 采用post方式进行提交

  • 提交给注册处理界面

Weiter lernen
||
<!DOCTYPE html> <html> <head> <title>php.cn</title> <meta charset="utf-8" /> <style> .box{ width:240px; height:90px; background:#f0f0f0; } </style> </head> <body> <!-- 登录界面 login.php--> <div class="box"> <form action="logincheck.php" method="post"> <table> <tr> <td align="right">用户名:</td> <td><input type="text" name="username" value="请输入用户名" maxLength="6"/></td> </tr> <tr> <td align="right">密 码:</td> <td><input type="password" name="userpwd" maxLength="6"/></td> </tr> <tr> <td><input type="submit" name="submit" value="登陆" /> </td> <td><a href="register.php">注册</a></td> </tr> </table> </form> <div> </body> </html>
einreichenCode zurücksetzen