Add the flight search and booking features.
[Project_webapp.git] / includes / search.php
index 2a1b947ea52c15f7274ce07c307b04aea77f779a..aab573303eccca127012171fdff80f304d892e1b 100644 (file)
@@ -1,14 +1,17 @@
 <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>
- <input type="datetime-local" name="departure_date" value="<?php echo date('Y-m-d\TH:i'); ?>" required>
+ <input type="datetime-local" name="departure_date" value="<?php echo date('Y-m-d\TH:i'); ?>" required/>
  <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>