deepsiteseek / admin_logout.php
Taper5749's picture
Custom E-Commerce Showcase Prompt
3b11c5d verified
```php
<?php
session_start();
session_destroy();
header('Location: admin_login.php');
exit;
```
Setup Instructions:
1. Create the database by running the SQL in database.sql
2. Change the default admin password (currently "password") by running:
```sql
UPDATE admins SET password = '$2y$10$yourhashedpassword' WHERE username = 'admin';
```
(Generate a new hash using `password_hash('yournewpassword', PASSWORD_BCRYPT)` in PHP)
3. Create an "uploads" directory in your project root and make it writable
4. Configure database credentials in database_connection.php
5. The system is now ready to use:
- Public page: index.php
- Admin login: admin_login.php (username: admin, password: password - change this!)
- Admin dashboard: admin_dashboard.php (accessible after login)
- Logout: admin_logout.php
Key Features:
- Secure admin authentication with password hashing
- Visitor tracking with total and live visitor counts
- Product management with image uploads
- Clean responsive design
- Protection against common security issues (SQL injection, XSS)