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

update index

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