prepare("SELECT * FROM items WHERE item_id = ?"); $stmt->execute([$_GET['id']]); $item = $stmt->fetch(); } catch (PDOException $e) { error_log("Database error fetching item: " . $e->getMessage()); // For production, you might redirect to an error page or show a generic error header("Location: listings.php"); exit(); } } if (!$item) { header("Location: listings.php"); exit(); } ?> '; echo $message; echo ''; echo ''; } ?>
<?php echo htmlspecialchars($item['name']); ?>


$ / day