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

登录功能.png

## Login function

注册功能.png

#Project composition structure

6.png

#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:

login.png

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:

login1.png

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

login2.png

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

login3.png

login4.png

##Introduction to registration function


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

login5.png

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

login6.png

Enter the previously registered user name, it will display:

login7.png

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

login8.png

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>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>
submitReset Code
ChapterCourseware