Our Products
query('SELECT name, description, price, image_url, stock_quantity FROM products ORDER BY created_at DESC'); $products = $stmt->fetchAll(); } catch (PDOException $e) { // In a real application, you would log this error and show a user-friendly message. error_log('Database error: ' . $e->getMessage()); $products = []; // Ensure products is an empty array on error } ?>$