@@ -25,19 +25,6 @@ This system is based on the tutorials "[Secure Login System with PHP and MySQL](
2525
2626XAMPP is recommended for local development as it includes PHP, MySQL, Apache, and phpMyAdmin.
2727
28- ## File Structure
29-
30- The project follows this general file structure:
31- /phplogin/
32- |-- index.php # Login form page, redirects if already logged in
33- |-- style.css # Stylesheet for all pages
34- |-- authenticate.php # Handles login authentication, session creation
35- |-- register.php # Registration form
36- |-- register-process.php # Handles user registrations
37- |-- home.php # Home page for logged-in users
38- |-- profile.php # User profile page
39- |-- logout.php # Handles user logout (destroys session)
40-
4128## Database Setup
4229
43301 . ** Create a Database:**
@@ -50,12 +37,12 @@ The project follows this general file structure:
5037
5138 ``` sql
5239 CREATE TABLE IF NOT EXISTS ` accounts` (
53- ` id` int (11 ) NOT NULL AUTO_INCREMENT,
54- ` username` varchar (50 ) NOT NULL ,
55- ` password` varchar (255 ) NOT NULL ,
56- ` email` varchar (100 ) NOT NULL ,
57- ` registered` datetime NOT NULL ,
58- PRIMARY KEY (` id` )
40+ ` id` int (11 ) NOT NULL AUTO_INCREMENT,
41+ ` username` varchar (50 ) NOT NULL ,
42+ ` password` varchar (255 ) NOT NULL ,
43+ ` email` varchar (100 ) NOT NULL ,
44+ ` registered` datetime NOT NULL ,
45+ PRIMARY KEY (` id` )
5946 ) ENGINE= InnoDB AUTO_INCREMENT= 2 DEFAULT CHARSET= utf8mb4 COLLATE= utf8mb4_unicode_ci;
6047 ```
6148
@@ -76,6 +63,7 @@ The project follows this general file structure:
7663 * `profile.php`
7764 * `register.php`
7865
66+
7967 ```php
8068 <?php
8169 // In authenticate.php, profile.php, etc.
0 commit comments