========================================
  RIG&DIG Industrial Suppliers
  PHP Website - Installation Guide
========================================

REQUIREMENTS:
- PHP 7.4 or higher (PHP 8.x recommended)
- MySQL 5.7+ or MariaDB 10.3+
- Apache with mod_rewrite enabled (or Nginx)
- PDO MySQL extension enabled

INSTALLATION:
1. Upload the entire folder to your web hosting (public_html or htdocs)
2. Create a MySQL database in your hosting panel (e.g., cPanel)
3. Visit your website URL in a browser (e.g., http://yourdomain.com/)
4. You will be redirected to the installer
5. Enter your database details and create an admin account
6. Click "Install" - the database tables are created automatically
7. Done! Your site is live.

ADMIN PANEL:
- Visit http://yourdomain.com/admin/login.php
- Login with the admin credentials you set during installation
- Manage categories, subcategories, and products with images

FILE STRUCTURE:
/index.php              - Homepage
/categories.php         - Product categories listing
/category.php           - Single category with products
/subcategory.php        - Subcategory products
/product.php            - Single product detail
/contact.php            - Contact page
/install.php            - Installer (runs once)
/config.php             - Auto-generated config (after install)
/admin/                 - Admin panel
/admin/login.php        - Admin login
/admin/index.php        - Dashboard
/admin/categories.php   - Manage categories
/admin/subcategories.php - Manage subcategories
/admin/products.php     - Manage products & images
/uploads/products/      - Uploaded product images
/assets/                - CSS, JS, site images
/includes/              - PHP includes (db, functions)

SECURITY NOTES:
- config.php is protected via .htaccess
- includes/ directory is blocked from direct access
- Passwords are hashed with PHP password_hash()
- All user input is sanitized
- File uploads are validated (type + size)

SUPPORT:
Email: Info@rigndig.com
Phone: +92 333 259 4493
