Fixed reservation submission in php
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 19:13:29 +0000 (15:13 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 30 Oct 2015 19:13:29 +0000 (15:13 -0400)
header.php
page-150.php

index 1c20d77..6747deb 100644 (file)
@@ -54,7 +54,7 @@
                                 <form name="form" id = "form" method="post" action="<?php echo get_permalink(150); ?>">
                                     <div class="row collapse">
                                         <div class="large-4 res-search columns">
-                                            <input id="propsearch" type="text" placeholder="Search by property" name="PropertyLocation">
+                                            <input id="propsearch" type="text" placeholder="Search by property" name="Location">
                                         </div>
                                         <div class="large-2 res-date columns">
                                             <input id="date1" name="ArrivalDate" placeholder="Arrival" type="text" >
index c8b99d5..490170c 100644 (file)
                         <?php endwhile; else:?>
                         <p><?php _e('Sorry, no results found.');?></p>
                         <?php endif;?>
-                        <?php //$arrival = urlencode($_REQUEST['ArrivalDate']); ?>
-                        <?php// $departure = urlencode($_REQUEST['DepartureDate']); ?>
+                        <?php  $arrival = urlencode($_REQUEST['ArrivalDate']); ?>
+                        <?php  $departure = urlencode($_REQUEST['DepartureDate']); ?>
+                        <?php  $occupancy= urlencode($_REQUEST['Occupancy']); ?>
                         <?php 
-                            if ($arrival == NULL || $departure == NULL){
+                           if ($arrival == NULL || $departure == NULL || $occupancy == NULL){
                                 $arrival = date("m/d/Y", strtotime("+2 days"));
                                 $departure = date("m/d/Y", strtotime($arrival. ' +2 days'));
-                            }
-                             $occupancy = "1";
+                               $occupancy = 1;
+                                
+                            } 
+                    
                             ?>
-                        <iframe name="res_frame" src="https://weblink.instantsoftware.com/widgetsearch/1134?PropertyLocation=<?php echo urlencode($_REQUEST['PropertyLocation']); ?> &ArrivalDate=<?php echo $arrival ?> &DepartureDate= <?php echo $departure ?>&Occupancy= <?php echo $occupancy ?>" height="3300" id="res_frame" width="100%" frameborder="0"></iframe>
+                        <iframe name="res_frame" src="https://weblink.instantsoftware.com/widgetsearch/1134?ArrivalDate=<?php echo $arrival ?>&DepartureDate=<?php echo $departure ?>&Location=<?php echo urlencode($_REQUEST['Location']); ?>&Occupancy=<?php echo $occupancy ?>" height="3300" id="res_frame" width="100%" frameborder="0"></iframe>
                 </div>
             </div>
         </div>