<?php
require_once 'includes/config.php';
require_once 'includes/db.php';

// Update category images
$category_images = [
    'Electronics' => 'assets/images/categories/electronics.jpg',
    'Clothing' => 'assets/images/categories/clothing.jpg',
    'Sports' => 'assets/images/categories/sports.jpg',
    'Home & Garden' => 'assets/images/categories/home_garden.jpg',
    'Books' => 'assets/images/categories/books.jpg'
];

foreach ($category_images as $category => $image_path) {
    $stmt = $pdo->prepare("UPDATE products SET category_image = ? WHERE category = ?");
    $stmt->execute([$image_path, $category]);
}

echo "Category images updated successfully!";
?>