A simple login and registration system built using PHP and MySQL.
Includes user role-based redirection, session handling and basic error management.
- User Registration
- Secure Login with Password Hashing
- Admin/User Role-Based Redirects
- Error Handling
- Responsive UI with custom CSS
- Clean & beginner-friendly code structure
- To-Do Task Management: Logged-in users will be able to:
- Create new to-do tasks.
- View their list of to-do tasks.
- Mark tasks as complete and delete tasks.
- PHP (Core)
- MySQL (Database)
- HTML/CSS
- Vanilla JavaScript
- XAMPP (Local Server)
-
Clone the repository (once you've created it on GitHub):
git clone [your-repository-url] cd your-project-directory -
Set up the database:
-
Create a new database in your MySQL server.
-
Import the provided database schema (if you have a
.sqlfile) or manually create theuserstable (and thetodostable when you're ready to add that feature) with the following structure:userstable:CREATE TABLE users ( id INT(11) UNSIGNED AUTO_INCREMENT PRIMARY KEY, username VARCHAR(50) UNIQUE NOT NULL, email VARCHAR(100) UNIQUE NOT NULL, password VARCHAR(255) NOT NULL, registration_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP );
(You'll create the
todostable later when you implement that feature.)
-
-
Configure database connection:
- Locate the file where you handle your database connection (e.g.,
db_config.phpor similar). - Update the database credentials (hostname, username, password, database name) to match your setup.
- Locate the file where you handle your database connection (e.g.,
-
Set up the web server:
- Ensure your web server is configured to point to the project's root directory.
- You might need to configure virtual hosts.
-
Access the application:
- Open your web browser and navigate to the project's URL (e.g.,
http://localhost/your-project-directory/register.php).
- Open your web browser and navigate to the project's URL (e.g.,
Good luck with the GitHub setup! Let me know if you have any questions about that process.
- Login Page

- Register Page

- As i register before, i simply logged in to my User account

- I can also login to my Admin account
[i didn't bothered to center the buttons because i am learning PHP, not CSS] - All the user accounts are being stored in the database

Gazi Taoshif
CSE department at East West University, Dhaka, Bangladesh
Building the future, one project at a time!🚀