Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try
- {
- $idcon = new PDO("mysql:localhost=127.0.0.1;dbname=ppe1","root","");
- }
- catch(PDOEeption $erreur)
- {
- echo "Echec de la connexion";
- }
- $requete = "SELECT * FROM site";
- $result = $idcon -> Query($requete);
- echo "<h3>Liste des élèves</h3>";
- echo "<table class='listeinsc' border = '1'>";
- echo "<tr>
- <th> Nom </th>
- <th> Prenom </th>
- <th> Adresse </th>
- <th> Code postal </th>
- <th> Ville </th>
- <th> Mail </th>
- <th> Téléphone </th>
- <th> Animal </th>
- <th> Gérer client </th>
- </tr>";
- While($ligne = $result -> fetch())
- {
- echo"<tr>";
- echo"<td>",$ligne['nom_client'],"</td>";
- echo"<td>",$ligne['prenom_client'], "</td>";
- echo"<td>",$ligne['adr_client'],"</td>";
- echo"<td>",$ligne['cp_client'], "</td>";
- echo"<td>",$ligne['ville_client'],"</td>";
- echo"<td>",$ligne['mail_client'], "</td>";
- echo"<td>",$ligne['tel_client'],"</td>";
- echo"<td>",$ligne['ani_client'], "</td>";
- echo "<td>
- <form method='post' action='modification.php'>
- <input type='hidden' name='nom_client' value='",$ligne['nom_client'],"'/>
- <input type='submit' value='Modifier'/>
- </form>
- <form method='post' action='delete.php' >
- <input type='hidden' name='nom_client' value='",$ligne['nom_client'],"'/>
- <input type='submit' value='Supprimer'/>
- </form></td>";
- echo "</tr>";
- }
- $result -> closeCursor();
- $idcon = NULL;
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement