search
  • Sign In
  • Sign Up
Password reset successful

Follow the proiects vou are interested in andi aet the latestnews about them taster

PHP user registration login system login registration page

Login page

The code is as follows:

<!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>

Code explanation:

  • Composed of a form form

  • Submit using post method

  • Submit to the login processing interface

  • Click to register and jump to the registration interface


Registration page

The code is as follows:

<!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>

Code explanation:

  • Composed of a form form

  • Submit using post method

  • Submit to the registration processing interface

new file
<!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>
Reset Code
Automatic operation
submit
Preview Clear