Simple Login

A minimal, single-user PHP login system that doesn't require MySQL.  
Perfect for protecting an admin page or a small area of your site with a simple username and password.

This repository contains:
- The **tutorial page** (`index.php`) that documents the code
- The **working demo** login system (`login.php` → `secretpage.php`)
- A **README** explaining installation and usage

---

## ✨ Features

- ✅ No database required (uses hardcoded credentials)
- ✅ Session-based authentication
- ✅ Redirects unauthenticated users to the login page
- ✅ Shows separate error messages for wrong username / wrong password
- ✅ Clean, responsive layout with Bootstrap 5
- ⚠️ Only supports **one user** (username + password)
- ⚠️ Not recommended for production without hashing & CSRF protection

---

## 📁 File Overview

| File | Purpose |
|------|---------|
| `index.php` | Tutorial page that displays the code for both files |
| `header.php` | Shared header include (site branding, CSS) |
| `footer.php` | Shared footer include (copyright, JS) |
| `login.php` | The actual login form (working demo) |
| `secretpage.php` | Protected page — only accessible after login |
| `logout.php` | Destroys the session and returns to login |
| `style.css` | Custom styles for the tutorial page |


---

## 🚀 Installation

1. **Clone or download** this repository to your web server directory.

2. **Create the download ZIP:**
   - Put `login.php`, `secretpage.php`, and `logout.php` into a folder


3. **Start a PHP server:**
   ```bash
   php -S localhost:8000