Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
hehbveh authored Jan 9, 2025
1 parent 684b482 commit 33749d4
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions registerbusiness_pda.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
// registerbusiness_pda.php

// Check if the form is submitted
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the selected flavors from the form
$selectedFlavors = $_POST['flavors'] ?? [];

// Display the selected flavors
echo "<h1>Selected Ice Cream Flavors</h1>";
if (!empty($selectedFlavors)) {
echo "<ul>";
foreach ($selectedFlavors as $flavor) {
echo "<li>" . htmlspecialchars($flavor) . "</li>";
}
echo "</ul>";
} else {
echo "<p>No flavors selected.</p>";
}

// Exit to prevent re-showing the form
exit;
}
?>

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Ice Cream Flavor Selector</title>
</head>
<body>
<h1>Register Your Favorite Ice Cream Flavors</h1>
<form action="registerbusiness_pda.php" method="POST">
<label>
<input type="checkbox" name="flavors[]" value="Vanilla"> Vanilla
</label><br>
<label>
<input type="checkbox" name="flavors[]" value="Chocolate"> Chocolate
</label><br>
<label>
<input type="checkbox" name="flavors[]" value="Strawberry"> Strawberry
</label><br>
<label>
<input type="checkbox" name="flavors[]" value="Mint Chocolate Chip"> Mint Chocolate Chip
</label><br>
<label>
<input type="checkbox" name="flavors[]" value="Cookie Dough"> Cookie Dough
</label><br>
<button type="submit">Submit</button>
</form>
</body>
</html>

0 comments on commit 33749d4

Please sign in to comment.