Fix the SQL for reservations class modification.
[Project_webapp.git] / includes / search.php
index b35c762dec317609aeabda28eaff09c0dba2c907..6ae2621888f0b1e2d0252df0b85446746aa63de8 100644 (file)
@@ -10,7 +10,6 @@ $return_flight_arrival_city = "";
 $return_flight_departure_date = "";
 $oDepartureDate = new DateTime("now");
 if ($action === "return_flight") {
-    //var_dump($_SESSION);
     if (isset($_SESSION['return_flight_departure_city'])) $return_flight_departure_city = $_SESSION['return_flight_departure_city'];
     if (isset($_SESSION['return_flight_arrival_city'])) $return_flight_arrival_city = $_SESSION['return_flight_arrival_city'];
     if (isset($_SESSION['return_flight_departure_date'])) {
@@ -29,7 +28,7 @@ if ($action === "return_flight") {
  <select size="1" name="departure_city" required>
   <optgroup label="Se&#769;lectionner une ville">
  <?php
- $sql_pquery = "select distinct VilleD from VOLS";
+ $sql_pquery = "select distinct VilleD from VOLS order by VilleD";
  global $connection;
  $connection->prepare_query($sql_pquery);
  $connection->run_prepared_query();
@@ -52,7 +51,7 @@ if ($action === "return_flight") {
  <select size="1" name="arrival_city" required>
   <optgroup label="Se&#769;lectionner une ville">
  <?php
- $sql_pquery = "select distinct VilleA from VOLS";
+ $sql_pquery = "select distinct VilleA from VOLS order by VilleA";
  global $connection;
  $connection->prepare_query($sql_pquery);
  $connection->run_prepared_query();