Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.52 KB | None | 0 0
  1. <?php
  2. try
  3. {
  4. $idcon = new PDO("mysql:localhost=127.0.0.1;dbname=ppe1","root","");
  5.  
  6. }
  7. catch(PDOEeption $erreur)
  8. {
  9. echo "Echec de la connexion";
  10. }
  11. $requete = "SELECT * FROM site";
  12. $result = $idcon -> Query($requete);
  13. echo "<h3>Liste des élèves</h3>";
  14. echo "<table class='listeinsc' border = '1'>";
  15. echo "<tr>
  16. <th> Nom </th>
  17. <th> Prenom </th>
  18. <th> Adresse </th>
  19. <th> Code postal </th>
  20. <th> Ville </th>
  21. <th> Mail </th>
  22. <th> Téléphone </th>
  23. <th> Animal </th>
  24. <th> Gérer client </th>
  25. </tr>";
  26. While($ligne = $result -> fetch())
  27. {
  28. echo"<tr>";
  29. echo"<td>",$ligne['nom_client'],"</td>";
  30. echo"<td>",$ligne['prenom_client'], "</td>";
  31. echo"<td>",$ligne['adr_client'],"</td>";
  32. echo"<td>",$ligne['cp_client'], "</td>";
  33. echo"<td>",$ligne['ville_client'],"</td>";
  34. echo"<td>",$ligne['mail_client'], "</td>";
  35. echo"<td>",$ligne['tel_client'],"</td>";
  36. echo"<td>",$ligne['ani_client'], "</td>";
  37. echo "<td>
  38. <form method='post' action='modification.php'>
  39. <input type='hidden' name='nom_client' value='",$ligne['nom_client'],"'/>
  40. <input type='submit' value='Modifier'/>
  41. </form>
  42. <form method='post' action='delete.php' >
  43. <input type='hidden' name='nom_client' value='",$ligne['nom_client'],"'/>
  44. <input type='submit' value='Supprimer'/>
  45. </form></td>";
  46. echo "</tr>";
  47. }
  48. $result -> closeCursor();
  49. $idcon = NULL;
  50. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement