Sweet Crumbs Bakery PHP/MySQL Website - Corrected Admin Edition

INSTALLATION
1. Copy the bakery_site_fixed folder into your local web root, for example:
   C:\xampp\htdocs\bakery_site_fixed
2. Open phpMyAdmin.
3. Import schema.sql. The script creates/uses the database bakery_shop.
4. Check includes/config.php and change the database username/password if required.
5. Visit http://localhost/bakery_site_fixed/

DEFAULT ADMIN LOGIN
Email: admin@bakery.test
Password: admin123

IMPORTANT WHEN UPGRADING AN EXISTING INSTALLATION
Importing the corrected schema.sql will reset the default administrator's password and role through ON DUPLICATE KEY UPDATE. It also creates the contact_messages table.
Back up any important database data before replacing or re-importing tables.

CORRECTIONS AND ADMIN FUNCTIONS
- Administrators are redirected directly to admin/dashboard.php after login.
- Correct password hash for admin123 is included in schema.sql.
- Dashboard statistics for products, users, orders, revenue, blogs and messages.
- Product add/edit/delete management.
- Order listing and status management.
- Blog add/edit/delete management.
- User role management and deletion safeguards.
- Contact form messages are stored in the database and visible in Admin > Messages.
- Improved responsive admin layout and tables.

This remains an educational plain PHP/PDO project. For production use, add CSRF protection, hardened file uploads, payment gateway integration, HTTPS, audit logs and more detailed validation.
