Search the Community
Showing results for tags 'reservation form'.
-
I need help with my reservation page. Form showing all value at 3rd page of 1st and 2nd pages at localhost. But it show value on server email like ON, ON for each one values. You can see attach image of third one page. Kindly help me. Thanks in advance. form page: <div id="contact"> <p class="fontstyle">Make a Reservation</p> <form name="reservation" method="post" action="reservation.php" onsubmit="return validate_this()"> <div id="field1"> <select name="trip_type" id="trip_type" style="height:25px; width:350px; margin-left:10px;" onchange="load_sub(this.value)"> <option value="One Way Trip">Select Trip Type</option> <option value="One Way Trip">One Way Trip</option> <option value="Return Trip">Return Trip</option> <option value="Hourly As Directed">Hourly As Directed</option> </select> </div> <div id="trip_type_sub" class="trip_type_sub"> <select name="pickup_airport" id="pickup_airport" style="height:25px; width:350px; margin-left:10px;"> <option value="From Airport to Airport">Select Airport</option> <option value="From Airport to Airport">From Airport to Airport</option> <option value="From Airport to Home/Office/Hotel/Landmark">From Airport to Home/Office/Hotel/Landmark</option> <option value="From Home/Office/Hotel/Landmark to Airport">From Home/Office/Hotel/Landmark to Airport</option> <option value="From Train Station to Home/Office/Hotel/Landmark">From Train Station to Home/Office/Hotel/Landmark</option> <option value="From Home/Office/Hotel/Landmark to Train Station">From Home/Office/Hotel/Landmark to Train Station</option> <option value="From Airport to Train Station">From Airport to Train Station</option> <option value="From Train Station to Airport">From Train Station to Airport</option> <option value="From Non-Airport to Non-Airport (Point-to-Point)">From Non-Airport to Non-Airport (Point-to-Point)</option> <option value="Other">Other</option> </select> </div> <div id="field2"> <select name="passengers" id="passengers" style="height:25px; width:350px; margin-left:10px;"> <option value="0">Number of passengers</option> <?php $a = 1 ; while ($a<=50){echo "<option value=$a>$a</option>"; $a++;}?> </select> </div> <div id="field3"> <input type="text" name="pickup_date" class="tcal" value="20/10" style="height:25px; width:310px; color:#000;" /> </div> <div id="field4"> <select name="pickup_hour" id="pickup_hour" style="height:25px; width:225px; margin-left:10px;"> <option value="0">Pickup up time</option> <?php for($i=1; $i<=12;$i++){echo "<option value='$i AM'>$i AM </option>";} for($i=1; $i<=12;$i++){echo "<option value='$i PM'>$i PM </option>";}?> </select> <select name="pickup_minute" style="height:25px; width:100px; "> <option value="00">:00</option> <option value="15">:15</option> <option value="30">:30</option> <option value="45">:45</option> </select> </div> <div id="field5"> <select name="drop_hour" id="drop_hour" style="height:25px; width:225px; margin-left:10px;"> <option value="0">Drop off time</option> <?php for($i=1; $i<=12;$i++){echo "<option value='$i AM'>$i AM </option>";} for($i=1; $i<=12;$i++){echo "<option value='$i PM'>$i PM </option>";}?> </select> <select name="drop_minute" style="height:25px; width:100px;"> <option value="00">:00</option> <option value="15">:15</option> <option value="30">:30</option> <option value="45">:45</option> </select> </div> <div id="field6"> <input type="text" name="pickup_address" id="pickup_address" value="Pickup: Address, City or Zip" style="height:25px; width:350px; color:#000; margin-left:10px;" onfocus="check_address(this.value)" onblur="check_address(this.value)"> </div> <div id="field7"> <input type="text" name="dropup_address" id="dropup_address" value="Drop off: Address, City or Zip" style="height:25px; width:350px; color:#000; margin-left:10px;" onfocus="check_address2(this.value)" onblur="check_address2(this.value)"> </div> <input class="btn_submit" name="submit" type="submit" value="" /> </form> </div><!--end contact--> reservation page: <?php session_start(); ?> <?php if(isset($_POST['submit'])) { $trip_type = $_POST['trip_type']; $pickup_airport = $_POST['pickup_airport']; $passengers = $_POST['passengers']; $pickup_date = $_POST['pickup_date']; $pickup_hour = $_POST['pickup_hour']; $pickup_minute = $_POST['pickup_minute']; $drop_hour = $_POST['drop_hour']; $drop_minute = $_POST['drop_minute']; $pickup_address = $_POST['pickup_address']; $dropup_address = $_POST['dropup_address']; } $_SESSION['trip_type'] = $trip_type; $_SESSION['pickup_airport'] = $pickup_airport; $_SESSION['passengers'] = $passengers; $_SESSION['pickup_date'] = $pickup_date; $_SESSION['pickup_hour'] = $pickup_hour; $_SESSION['pickup_minute'] = $pickup_minute; $_SESSION['drop_hour'] = $drop_hour; $_SESSION['drop_minute'] = $drop_minute; $_SESSION['pickup_address'] = $pickup_address; $_SESSION['dropup_address'] = $dropup_address; ?> <div id="big_form_back"> <p class="formcenter1">Please fill out this form to get a Quote for your One-way trip from Washington DC to IAD - Washington Dulles International Airport.</p> <p class="formcenter1"><b>What type of Vehicle are you interested in reserving?</b></p> <div id="mainform"> <form method="post" action="received.php" id="form" class="blocks"> <div style="margin-left:60px"> <p style="color:#000"> <input type="radio" name="vType" value="Lincoln Town Car 4-passenger">Lincoln Town Car, 4-passenger <br> <input type="radio" name="vType" value="SUV 6-passenger">SUV, 6-passenger <br> <input type="radio" name="vType" value="Stretch Limo 8-passenger">Stretch Limo, 8-passenger <br> <input type="radio" name="vType" value="Private Van 8-passenger">Private Van, 8-passenger <br> <input type="radio" name="vType" value="Private Van 13-passenger">Private Van, 13-passenger </p> </div> <!-- fixed fields --> <p class="formcenter">Note any EXTRA STOPS you want to make: </p> <p class="formcenter"><textarea name="extraStops" rows="5" cols="35"></textarea></p> <p class="formcenter"><b>Contact Info for Quote: </b></p> <p class="formcenter"><label>Contact person's NAME:</label><input type="text" class="text" name="name" /></p> <p class="formcenter"><label>Your e-mail:</label> <input type="text" class="text" name="email" /> <br>*(If you want a quote emailed, enter a valid email address.)</p> <p class="formcenter"><label>Contact number:</label> <input type="text" class="text" name="phone" /> </p> <p class="qdetail"><font size="-2"> Would you like to receive a phone call regarding your quote?**</font></p> <p class="qdetail"><input name="isphonecall" id="isphonecall" type="radio" value="no"> No <input name="isphonecall" type="radio" value="yes">Yes</p> <p class="qdetail"><font size="-2">If Yes, when is the Best Time for us to Call:</font></p> <p class="qdetail">Between <select name="calltimefrom"><option value="Now">Now</option><?php for($i= 1; $i<= 12; $i++){ echo "<option value='$i AM'>$i AM</option>";}for($i= 1; $i<= 12; $i++){ echo "<option value='$i PM'>$i PM</option>";}?></select> To <select name="calltimeto"><option value="Now">Now</option><?php for($i= 1; $i<= 12; $i++){ echo "<option value='$i AM'>$i AM</option>";}for($i= 1; $i<= 12; $i++){ echo "<option value='$i PM'>$i PM</option>";}?></select><br>**(Subject to staff availability.)</p> <p class="qdetail"><b>Note any SPECIAL NEEDS or concerns:</b> </p> <p class="qdetail"><textarea name="specialNeeds" rows="5" cols="35"></textarea></p> <!-- fixed fields --> <div class="qdetail"><input type="hidden" name="quote" value="q2"></div> <div class="qdetail"> <input class="btn_submit" name="submit" type="submit" value="" /> </div> </form> </div> <!--main form area--> </div> </div> received page: <?php session_start(); ?> <?php $_SESSION['trip_type']; $_SESSION['pickup_airport']; $_SESSION['passengers']; $_SESSION['pickup_date']; $_SESSION['pickup_hour']; $_SESSION['pickup_minute']; $_SESSION['drop_hour']; $_SESSION['drop_minute']; $_SESSION['pickup_address']; $_SESSION['dropup_address']; if(isset($_POST['submit'])) { $vType = (isset($_POST['vType']) ? strip_tags($_POST['vType']) : ''); $extraStops = (isset($_POST['extraStops']) ? strip_tags($_POST['extraStops']) : ''); $name = (isset($_POST['name']) ? strip_tags($_POST['name']) : ''); $email = (isset($_POST['email']) ? strip_tags($_POST['email']) : ''); $phone = (isset($_POST['phone']) ? strip_tags($_POST['phone']) : ''); $isphonecall = (isset($_POST['isphonecall']) ? strip_tags($_POST['isphonecall']) : ''); $calltimefrom = (isset($_POST['calltimefrom']) ? strip_tags($_POST['calltimefrom']) : ''); $calltimeto = (isset($_POST['calltimeto']) ? strip_tags($_POST['calltimeto']) : ''); $specialNeeds = (isset($_POST['specialNeeds']) ? strip_tags($_POST['specialNeeds']) : ''); $_SESSION['vType'] = $vType; $_SESSION['extraStops'] = $extraStops; $_SESSION['name'] = $name; $_SESSION['email'] = $email; $_SESSION['phone'] = $phone; $_SESSION['isphonecall'] = $isphonecall; $_SESSION['calltimefrom'] = $calltimefrom; $_SESSION['calltimeto'] = $calltimeto; $_SESSION['specialNeeds'] = $specialNeeds; } ?> <?php if(isset($_POST['submit3'])){ function sendMail($toMail, $toFrom, $toSubject, $toBody ) { $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; $headers .= 'From: dcbuscharter.co Reservation<' . $toFrom . ">\r\n"; $headers .='Reply-To: Limo In DC <'.$toFrom . ">\r\n"; $t = mail( $toMail, $toSubject, $toBody, $headers ); return ($t) ? true : false; } $to = "info@mylimos.net"; $subject = "Reservation Request ( dcbuscharter.co )."; $from = "info@dcbuscharter.co"; $body = "<h2 align='center'>New Reservation Request.</h2>"; $body .= '<table>'; $body .= "<tr><td><b>Trip type: </b><td><td>" . $_SESSION['trip_type'] ."</td></tr>"; $body .= "<tr><td><b>Pickup Airport: </b><td><td>" . $_SESSION['pickup_airport'] ."</td></tr>"; $body .= "<tr><td><b>Number of Passengers: </b><td><td>" . $_SESSION['passengers'] ."</td></tr>"; $body .= "<tr><td><b>Pickup Date: </b><td><td> On " . $_SESSION['pickup_date'] ."</td></tr>"; $body .= "<tr><td><b>Pickup Hour: </b><td><td> On " . $_SESSION['pickup_hour'] ."</td></tr>"; $body .= "<tr><td><b>Pickup Minute: </b><td><td> On " . $_SESSION['pickup_minute'] ."</td></tr>"; $body .= "<tr><td><b>Drop Hour: </b><td><td> On " . $_SESSION['drop_hour'] ."</td></tr>"; $body .= "<tr><td><b>Drop Minute: </b><td><td> On " . $_SESSION['drop_minute'] ."</td></tr>"; $body .= "<tr><td><b>Pickup Address: </b><td><td>" . $_SESSION['pickup_address'] ."</td></tr>"; $body .= "<tr><td><b>Dropoff Address: </b><td><td>" . $_SESSION['dropup_address'] ."</td></tr>"; $body .= "<tr><td><b>Required Vehicle: </b><td><td>" . $_SESSION['vType'] ."</td></tr>"; $body .= "<tr><td><b>Extra Stops: </b><td><td>" . $_SESSION['extraStops'] ."</td></tr>"; $body .= "<tr><td><b>Email: </b><td><td>" . $_SESSION['email'] ."</td></tr>"; $body .= "<tr><td><b>Contact Person: </b><td><td>" . $_SESSION['name'] ."</td></tr>"; $body .= "<tr><td><b>Contact Phone#: </b><td><td>" . $_SESSION['phone'] ."</td></tr>"; $body .= "<tr><td><b>Is Phone Call: </b><td><td>" . $_SESSION['isphonecall'] ."</td></tr>"; $body .= "<tr><td><b>Call Time From: </b><td><td>" . $_SESSION['calltimefrom'] ."</td></tr>"; $body .= "<tr><td><b>Call Time To: </b><td><td>" . $_SESSION['calltimeto'] ."</td></tr>"; $body .= "<tr><td><b>Special Needs: </b><td><td>" . $_SESSION['specialNeeds'] ."</td></tr>"; $body .= "</table>"; $sent = sendMail($to, $from, $subject, $body ); $sent = true; ?> <h2 style="color:#000; text-align:center"><?php echo ($sent)?"Thanks!":"Error"; ?></h2> <?php if($sent){ ?> <p class="p" style="text-align:center">Thanks for Contacting us.<br /> We will contact you on</p> <?php echo $_SESSION['email'];?> very soon. </p> <?php }else{?> <p class="p">Unknown error <br /> Please try later.</p> <?php } ?> <?php }else{ ?> <h2 style="color:#000;">Booking Summary</h2> <table class="p" height="200" width="400"> <tr> <td><b style="color:#000;">Trip Details</b></td> <td width="175"> </td> </tr> <tr> <td>Trip Type:</td> <td width="175"><?php echo $_SESSION['trip_type']; ?></td> </tr> <tr> <td>Pickup Airport:</td> <td width="175"><?php echo $_SESSION['pickup_airport']; ?></td> </tr> <tr> <td>Number OF Passengers:</td> <td><?php echo $_SESSION['passengers']; ?></td> </tr> <tr> <td>Pickup Date:</td> <td><?php echo $_SESSION['pickup_date']; ?></td> </tr> <tr> <td>Pickup Hour:</td> <td><?php echo $_SESSION['pickup_hour']; ?></td> </tr> <tr> <td>Pickup Minute:</td> <td><?php echo $_SESSION['pickup_minute']; ?></td> </tr> <tr> <td>Drop Hour:</td> <td><?php echo $_SESSION['drop_hour']; ?></td> </tr> <tr> <td>Drop Minute:</td> <td><?php echo $_SESSION['drop_minute']; ?></td> </tr> <tr> <td>Pickup Address:</td> <td><?php echo $_SESSION['pickup_address']; ?></td> </tr> <tr> <td>Dropoff Address:</td> <td><?php echo $_SESSION['dropup_address']; ?></td> </tr> <tr> <td>Selected Vehicle:</td> <td><?php echo $_SESSION['vType']; ?></td> </tr> <tr> <td>Name:</td> <td><?php echo $_SESSION['name']; ?></td> </tr> <tr> <td>Email:</td> <td><?php echo $_SESSION['email']; ?></td> </tr> <tr> <td>Contact#:</td> <td><?php echo $_SESSION['phone']; ?></td> </tr> <tr> <td>Is Phone Call:</td> <td><?php echo $_SESSION['isphonecall']; ?></td> </tr> <tr> <td>Call Time From:</td> <td><?php echo $_SESSION['calltimefrom']; ?></td> </tr> <tr> <td>Call Time To:</td> <td><?php echo $_SESSION['calltimeto']; ?></td> </tr> <tr> <td>Special Needs:</td> <td><?php echo $_SESSION['specialNeeds']; ?></td> </tr> <tr> <td colspan="2" style="color:#F00;">If above information is correct hit submit.</td> </tr> </table> <form method="post" action="" > <input type="hidden" name="submit3" value="" /> <div class="las"> <input class="btn_submit" name="submit" type="submit" value="" /> </div> </form> <?php } ?>