index.php 2.37 KB
Newer Older
Gaetan Carabetta's avatar
Gaetan Carabetta committed
1 2
<html>
<head>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
3
  <title>Clinique Vétérinaire</title>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
4 5 6 7
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
<body>
  <h1>Gestion de la clinique</h1>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
8 9 10 11 12
  <!-- ComboBox Affichage -->
  <div>
    <form method="post" action="affichage.php">
      <p>
        <label> Affiche la/les table(s) </label><br />
Gaetan Carabetta's avatar
Gaetan Carabetta committed
13
        <select name="affiche">
Gaetan Carabetta's avatar
Gaetan Carabetta committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
          <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 />
Gaetan Carabetta's avatar
Gaetan Carabetta committed
33
        <select name="ajoute">
Gaetan Carabetta's avatar
Gaetan Carabetta committed
34 35 36 37 38 39 40 41
          <option value="clients" selected>Clients</option>
          <option value="animaux">Animaux</option>
          <option value="traitements">Traitements</option>
        </select>
        <input type="submit" />
      </p>
    </form>
  </div>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
42
  <?php
Gaetan Carabetta's avatar
Gaetan Carabetta committed
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
  // 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>';
  // }
Gaetan Carabetta's avatar
Gaetan Carabetta committed
61
  ?>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
62 63 64 65 66 67 68 69 70 71 72 73 74
<?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>";
?>
Gaetan Carabetta's avatar
Gaetan Carabetta committed
75 76
</body>
</html>