Commit 44c3d027 authored by Gaetan Carabetta's avatar Gaetan Carabetta

update index

parent 6ceb4291
......@@ -5,43 +5,72 @@
</head>
<body>
<h1>Gestion de la clinique</h1>
<table border="1">
<tr><th>Numéro</th><th>Nom</th><th>Population</th></tr>
<?php
// Connexion à la base de données
$vHost = 'tuxa.sme.utc';
$vPort = '5432';
$vData = 'dbbdd0p042';
$vUser = 'bdd0p042';
$vPass = 'cyLu9JFl';
$vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass);
// Affichage du tableau de données
// $vSql ='';
// $vSt = $vConn->prepare($vSql);
// $vSt->execute();
// while ($vResult = $vSt->fetch(PDO::FETCH_ASSOC)) {
// echo '<tr>';
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo '</tr>';
// }
?>
</table>
<ul>
<!-- ComboBox Affichage -->
<div>
<form method="post" action="affichage.php">
<p>
<label> Affiche la/les table(s) </label><br />
<select>
<option value="all" selected>All</option>
<option value="clients">Clients</option>
<option value="veterinaires">Veterinaires</option>
<option value="assistants">Assistants</option>
<option value="classes">Classes</option>
<option value="especes">Especes</option>
<option value="animaux">Animaux</option>
<option value="medicaments">Medicaments</option>
<option value="traitements">Traitements</option>
</select>
<input type="submit" />
</p>
</form>
</div>
<!-- ComboBox Ajout -->
<div>
<form method="post" action="ajout.php">
<p>
<label> Ajout à la table </label><br />
<select>
<option value="clients" selected>Clients</option>
<option value="animaux">Animaux</option>
<option value="traitements">Traitements</option>
</select>
<input type="submit" />
</p>
</form>
</div>
<?php
$vSql ='';
$vSt = $vConn->prepare($vSql);
$vSt->execute();
$vResult = $vSt->fetch(PDO::FETCH_ASSOC);
echo "<li>Département le plus peuplé : <b>$vResult[__________]</b></li>";
$vSql ='______________________________________________________________';
$vSt = $vConn->prepare($vSql);
$vSt->execute();
$vResult = $vSt->fetch(PDO::FETCH_ASSOC);
echo "<li>Département le moins peuplé : <b>$vResult[__________]</b></li>";
// Connexion à la base de données
$vHost = 'tuxa.sme.utc';
$vPort = '5432';
$vData = 'dbbdd0p042';
$vUser = 'bdd0p042';
$vPass = 'cyLu9JFl';
$vConn = new PDO("pgsql:host=$vHost;port=$vPort;dbname=$vData", $vUser, $vPass);
// Affichage du tableau de données
// $vSql ='';
// $vSt = $vConn->prepare($vSql);
// $vSt->execute();
// while ($vResult = $vSt->fetch(PDO::FETCH_ASSOC)) {
// echo '<tr>';
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo "<td>$vResult[]</td>";
// echo '</tr>';
// }
?>
</ul>
<?php
// $vSql ='';
// $vSt = $vConn->prepare($vSql);
// $vSt->execute();
// $vResult = $vSt->fetch(PDO::FETCH_ASSOC);
// echo "<li>Département le plus peuplé : <b>$vResult[__________]</b></li>";
// $vSql ='______________________________________________________________';
// $vSt = $vConn->prepare($vSql);
// $vSt->execute();
// $vResult = $vSt->fetch(PDO::FETCH_ASSOC);
// echo "<li>Département le moins peuplé : <b>$vResult[__________]</b></li>";
?>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment