Tidy a bit the files structure.
[Project_webapp.git] / includes / home.php
similarity index 78%
rename from home.php
rename to includes/home.php
index 5499ba92e1cc09cdd90eea58e6d1ca8772fb891d..cc378a2836c3dfdd0c389e4e20ea29e7407c54ef 100644 (file)
--- a/home.php
@@ -1,9 +1,9 @@
 <?php
+
 function home()
 {
-    global $configs;
+    global $connection;
 
-    $connection = new CustomDB($configs['host'], $configs['username'], $configs['password'], $configs['database']);
     $requete = "SELECT NumCl, NomCl, CodePosteCl, VilleCl FROM CLIENTS";
     $result = $connection->query($requete);
     echo "<table border=1>\n";
@@ -17,7 +17,6 @@ function home()
     }
     echo "</table>\n";
     $result->close();
-    $connection->close();
 }
 
 home();