PHP Tutorial – Login using Session
System flow chart
[Link] [Link]
No
username &
password
provided?
Yes
[Link]
Valid
username &
[Link] No
Password?
status=false
Yes
[Link]
[Link]
[Link]
Figure 1: Login system structure
Table 1: Description of each web page file
File Name Description
[Link] Login interface.
[Link] To handle login information and create a session for that user.
[Link] To verify user identity in accessing this website. Include this file in every
protected page to avoid unauthorized user enter.
[Link] To display protected web page if user is valid. If you enter directly to this
page, you will be checked by the authenticator, and then redirect to login-
[Link].
[Link] To display error message if user is invalid.
[Link] To logout from the website and destroy the self identity.
Creating ‘profile’ table using ‘ngchoonching’ database
Insert dummy data
Creating Server Side Scripting, PHP
1. Creating index file named as “[Link]”
2. Creating database connection scripting named as “[Link]”
3. Creating insert page interface named as “[Link]”
4. Creating insert query scripting named as “[Link]”
5. Creating display page named as “[Link]”
6. Creating update query scripting named as “[Link]