Add the flight search and booking features.
[Project_webapp.git] / includes / search.php
index 366c9627d9215aff953d4e7c76979b9f1e2965ba..aab573303eccca127012171fdff80f304d892e1b 100644 (file)
@@ -1,7 +1,10 @@
 <h1> Rechercher un vol </h1>
 
+<?php if (isset($_SESSION['return_flight'])) ?>
+
 <form action="index.php" id="search" method="post">
  <input type="hidden" name="form" value="search" />
+ <input type="hidden" name="date_now" value="<?php echo date('Y-m-d\TH:i'); ?>" />
  <label> De&#769;part : Ville -> </label>
  <input type="text" size="15" name="departure_city" required/>
  <label> Date -> </label>
@@ -9,6 +12,6 @@
  <label> Arrive&#769;e : Ville -> </label>
  <input type="text" size="15" name="arrival_city" required/>
  <label> Date -> </label>
- <input type="datetime-local" name="arrival_date" value="<?php echo date('Y-m-d\TH:i'); ?>" required/>
+ <input type="datetime-local" name="arrival_date" value="<?php echo date('Y-m-d\TH:i', time() + 86400); ?>" required/>
  <input type="submit" value="Valider">
 </form>