A simple authentication system built with core PHP (no framework), demonstrating user registration, login, logout and session-based authentication.
- User Registration
- User Login
- User Logout
- Password hashing
- Session-based authentication
- Server-side validation
- Proper error handling
- Clean folder structure
- PHP (Core PHP)
- MySQL
- HTML5
- CSS3
- Apache (XAMPP)
git clone https://github.com/hashmat-mowahidi/php-auth.git
cd php-auth- XAMPP installed
- Apache running
- MySQL running
<?php
$host = 'localhost';
$dbname = 'user_auth';
$dbusername = 'root';
$dbpassword = '';- You do NOT need to manually create the database
- The database and required tables are created automatically when index.php is run for the first time
- Move the project folder to:
xampp/htdocs/
- Open your browser and visit:
http://localhost/php-auth/index.php