/Users/johnr/Desktop/IA pdf Downloads/_New Projects Downloads May 7th/CS_IA_Mattew/storeDestination.html |
1 <?php 2 spl_autoload_register(function ($class_name) { // https://www.php.net/manual/en/language.oop5.autoload.php 3 include $class_name . '.class.php'; 4 }); 5 //checking is there are any destinations input 6 if(isset($_POST['destinations'])){ 7 $chosenDestinations = implode(', ',$_POST['destinations']); 8 $destination = new Destination(); 9 $destination->setChosenDestination($chosenDestinations); 10 apcu_store('destination', $destination); 11 header("Location: hotelandgolfselection.html"); 12 die(); 13 }else{ 14 echo '<script>alert("Please select at least one destination")</script>'; 15 ?><script>history.back()</script><?php 16 } 17 18 19 20 21