PHP user regist...LOGIN

PHP user registration login system project introduction

Project Introduction

##The goal of this course is to develop a login registration program, mainly to implement the website Login and registration functions, including the creation of database user tables, user registration writing information to the database, logging in to query database information, etc.

Project flow chart

Login function


## Login function


#Project composition structure


#Login function introduction

The project currently consists of five files. In the first version, we only implemented simple login registration. The project consists of running the login page (login .php) Start

Click to log in without entering anything. The effect is as follows:


Input error After confirming the inconsistency through database query (the username and password exist in the database, which we will introduce in the next section), the effect is as follows:


Enter the correct username and password , after confirming consistency through database query, the effect is as follows:


Click OK at this time and enter the homepage index.php (the homepage has no content yet)



##Introduction to registration function

Click the registration button on the login
page to enter the registration page:


##Click to register without entering anything or if the input is incomplete:


Enter the previously registered user name, it will display:


Enter the unregistered user name and password, it will display:


At this point, the information has been stored in the database

In the next section we will introduce the construction of the database

Next Section

<!DOCTYPE html> <html> <head> <title></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>
submitReset Code