Basic user authentication system using PHP & MySQL
Clone the repository to htdocs
or www
repository according to the tool (XAMPP or LAMPP)
Prerequisites:
- XAMPP -> Start (Apache & MySQL)
using PHPMyAdmin, create a database
user_auth
and import theuser_credentials
sql file - In
db_config.php
file, assumption for MySQL db connection has no password.
Use-case Execution:
- Visit the index page,
localhost/user_auth/
- Create an account by visiting,
Register Here
page - If registration is successfull then, visit the Log In page
- Enter the registered account credentials to access
dashboard
page - If the details are matched then, dashboard page will be loaded
- In dashboard page, you have a button to Log Off from your account.
Test-case:
- Basic form validations in all the pages
- User cannot access the dashboard page without a valid account
- Account with simillar username cannot be registered
- Hash password is stored in the MySQL table
- Session will be expired in 5 minutes, if there isn't any activity on dashboard page