mirror of
https://gitlab.aliens-lyon.fr/savrillo/gpens.git
synced 2026-09-11 21:20:46 +02:00
Caché les mdp. Les données récupérées sont mainenant jolies.
This commit is contained in:
+7
-2
@@ -1,8 +1,13 @@
|
||||
<?php
|
||||
|
||||
// Connection à la BDD:
|
||||
ini_set('display_errors', 1);
|
||||
ini_set('display_startup_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
include 'bddpass.php';
|
||||
try {
|
||||
$conn = new PDO("mysql:host=localhost;dbname=savrillo", savrillo, "BHTvo0JfS");
|
||||
$conn = new PDO("mysql:host=localhost;dbname=savrillo", "savrillo", $bddpass, array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8'));
|
||||
// set the PDO error mode to exception
|
||||
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch(PDOException $e) {
|
||||
@@ -30,7 +35,7 @@ if($_GET["salle"] != NULL) {
|
||||
$resP = $stmt->fetchAll();
|
||||
|
||||
for($i=0;$i<count($resP);$i++)
|
||||
$locataires[$i] = $resP[$i]['nom'];
|
||||
$locataires[$i] = $resP[$i]['personne'];
|
||||
|
||||
|
||||
$stmt = $conn->prepare("SELECT id, nom, description FROM salles WHERE id=?");
|
||||
|
||||
Reference in New Issue
Block a user