query("SELECT p.id, p.name, p.barcode, i.quantity FROM products p JOIN inventory i ON p.id = i.product_id ORDER BY p.name"); $inventory_items = $stmt->fetchAll(); } catch (PDOException $e) { echo "
Database error: " . htmlspecialchars($e->getMessage()) . "
"; $inventory_items = []; } ?>

Inventory Management

' . htmlspecialchars($_SESSION['success_message']) . ''; unset($_SESSION['success_message']); } if (isset($_SESSION['error_message'])) { echo ''; unset($_SESSION['error_message']); } ?>
Product Name Barcode Current Stock Update Stock
No products found in inventory.