This is a simple web authentication system that allows users to sign up, log in, and log out. The application is built using PHP and MySQL for user registration and login functionality. It utilizes PHP sessions to manage user authentication securely.
Users can create an account by providing a unique username and password. The system checks for existing usernames to avoid duplication. If the provided username is already taken, the user will be prompted to choose another username.
Registered users can log in with their credentials. The system verifies the entered username and password against the database and grants access upon successful login. If the provided credentials are incorrect, the user will be shown an error message.
Logged-in users can log out from their accounts by clicking on the "Logout" link. The application uses PHP sessions to manage user authentication and logout securely.
After successful login, users are greeted with a warm welcome message on the "Welcome" page, displaying their username. This personalized welcome message makes users feel acknowledged upon logging in.
- PHP server with MySQL support (e.g., XAMPP, WAMP, LAMP, etc.).
- MySQL database to store user information.
-
Clone the repository to your local server using
git clone
or download the ZIP file. -
Set up a MySQL database and import the required table schema using the provided SQL file (
database.sql
). -
Configure the database connection in the
partials/_dbconnect.php
file. -
Run the application using your PHP server (e.g.,
php -S localhost:8000
).
- Access the web application through your web browser.
- If you are a new user, click on the "Sign Up" link to create an account.
- Enter a unique username and password for your account.
- Upon successful account creation, you will be redirected to the "Login" page.
- Log in using your registered username and password.
- After successful login, you will be redirected to the "Welcome" page, where a warm welcome message will be displayed with your username.
- To log out, click on the "Logout" link on the "Welcome" page.
- You will be logged out, and the session will be destroyed.
Contributions are welcome! If you find any issues or have suggestions for improvement, feel free to open an issue or submit a pull request.