|
@@ -46,14 +46,44 @@ $stmt = $pdo->prepare($sql);
|
|
|
$stmt->execute($itemIDs);
|
|
|
$items = $stmt->fetchAll();
|
|
|
|
|
|
+?>
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Your packing list</title>
|
|
|
+ <style>
|
|
|
+ body {
|
|
|
+ font-family: Arial, sans-serif;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ .item-item {
|
|
|
+ margin: 5px 0;
|
|
|
+ }
|
|
|
+ .item-item input {
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+
|
|
|
+<h1>You need</h1>
|
|
|
+<?php
|
|
|
// Display results as HTML with checkboxes
|
|
|
-echo "<form method='post' action='process_selection.php'>";
|
|
|
+echo "<form method='post' action='index.php'>";
|
|
|
echo "<ul>";
|
|
|
foreach ($items as $item) {
|
|
|
- echo "<li><input type='checkbox' name='selected_items[]' value='" . htmlspecialchars($item['itemID']) . "'> " . htmlspecialchars($item['itemName']) . "</li>";
|
|
|
+ echo "
|
|
|
+ <div class='item-item'>
|
|
|
+ <input type='checkbox' name='selected_items' value='" . htmlspecialchars($item['itemID']) . "'>
|
|
|
+ <label for=selected_items_" . htmlspecialchars($item['itemID']) . ">"
|
|
|
+ . htmlspecialchars($item['itemName']
|
|
|
+ . "</label></div>";
|
|
|
}
|
|
|
echo "</ul>";
|
|
|
-echo "<button type='submit'>Submit</button>";
|
|
|
echo "</form>";
|
|
|
-
|
|
|
?>
|
|
|
+
|
|
|
+</body>
|
|
|
+</html>
|