My ice cream shop
Error: You didn't type in your name!
";
} else {
echo "Welcome, " . $_GET['yourname'] . '!';
echo '
';
}
$icecream_choices = array('greentea', 'chocolate', 'vanilla');
if (!in_array($_GET['icecream'], $icecream_choices)) {
echo "Error: You didn't submit the form correctly.
";
} else {
echo "Your favorite type of ice cream is " . $_GET['icecream'] . '. Yum!';
echo "
";
}
if (isset($_GET['cone'])) {
echo "You want a cone";
} else {
echo "You don't want a cone :(";
}
echo '
';
echo "You want the following topping: " . $_GET['topping'];
?>