Martha's CIS 52 Lab #1 Exercise #9

Lab #1 Exercise #9. Create a form that asks a user to select a destination from a list of radio buttons. The choices are: San Francisco, New York, London, Paris, Honolulu, and Tokyo.

Write a PHP script that uses a switch statement to evaluate each of the cities, and based on the city selected by the user, sends back a message such as, "Welcome to San Francisco. Be sure to bring your heart and a jacket!" or "Bonjour, let's take a stroll on the left bank!".

For Problem 9:  Please have two files:  one HTML and one PHP

**************************************************************

CODES:

<?php 
if (isset($_POST['submit'])) {
$selected_radio = $_POST['selectedCity'];
switch ($selected_radio) {
case "sf":
echo "Don't forget your umbrella!";
break;
case "ny":
echo "Enjoy the Big Apple!";
break;
case "london":
echo "Cheerio, Chap!";
break;
case "paris":
echo "Bonjour!";
break;
case "honolulu":
echo "Hang Five!";
break;
case "tokyo":
echo "Enjoy the sushi!";
break;
}
}
?>

**************************************************************

ANSWER: