Ignore the other post, I accidentally submitted it before I was finished outlining my problem.
I have an HTML form that uses a drop-down list for users to choose a destination (their are five options Barcelona, Cairo, Rome, Santiago, Tokyo). Once the user’s choice has been submitted to the php program, I need to create two associative arrays ($farePerPerson which is the cost of a plane tix depending on the user’s choice. Each choice has a different value depending on the user’s $destination and $hotelPerNight which is the cost of a hotel room depending on the user’s choice. Each choice has a different value depending on the user’s $destination). I have included the HTML code and PHP code below. I need help with how to write the associative arrays so that the info will print the user’s $destination, $farePerPerson and $hotelPerNight.
Thanks in advance
Here is the HTML code:
TRAVEL COSTSTRAVEL COSTS
Select your travel destination: BarcelonaCairoRomeSantiagoTokyo
Now the user’s choice is submitted to travelCosts.php and here is the php code:
TRAVEL COSTS <?php $destination = $_POST['destination']; $farePerPerson = ; $hotelPerNight = ; print ("<h1>TRAVEL COSTS for $destination</h1>");
print ("<p>The air fare is $".number_format($farePerPerson, 2)." per person</p>");
print ("<p>The hotel rates are $".number_format($hotelPerNight, 2)." per night.</p>");
?>
Thanks,
Jason