A secure user authentication system with login and registration functionality, built using PHP, MySQL, HTML, CSS (Tailwind), and JavaScript.
- User Registration: Allows users to sign up for an account by providing necessary details.
- User Login: Users can log in securely using their credentials.
- Protected Routes: Access to specific pages is restricted and requires successful authentication.
- Password Hashing: Ensures that user passwords are stored securely in the database.
- Session Management: Maintains user sessions to handle login status across pages.
- Frontend: HTML, CSS (Tailwind), JavaScript
- Backend: PHP
- Database: MySQL
-
Clone the repository:
git clone https://github.com/hashirmeraj/PRODIGY_FS_01.git
-
Navigate to the project directory:
cd PRODIGY_FS_01
-
Setup the database:
- Create a new MySQL database.
- Import the provided SQL file (
users1.sql
) to set up the necessary tables.
-
Configure the database connection:
- Open the file ./particles/config.php in a text editor.
- Update the
config.php
file with your database credentials.
<?php $servername = 'localhost'; $username = 'root'; $password = ''; $dbname = 'users1'; // Create connection $conn = mysqli_connect($servername, $username, $password, $dbname); // Check connection if (!$conn) { die("Connection failed: " . mysqli_connect_error()); } ?>
-
Run the project:
- Place the project files in the root directory of your server (e.g.,
htdocs
for XAMPP). - Start the server and navigate to
http://localhost/PRODIGY_FS_01
in your browser.
- Place the project files in the root directory of your server (e.g.,
- Sign Up: Create a new account using the registration form.
- Log In: Access your account by entering your credentials.
- Access Protected Pages: Navigate through the application and access restricted content based on your authentication status.
For any inquiries or support, please contact [hashirmeraj1@gmail.com].