Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Produkty</title>
  5. <meta charset="UTF-8" />
  6. </head>
  7.  
  8. <body>
  9.  
  10. <h1>Lista rekordów</h1>
  11. <?php include "db_connect.php" ?>
  12. <?php
  13.  
  14.  
  15. $array = oci_parse($connection, "SELECT * FROM Osoby");
  16.  
  17. oci_execute($array);
  18. echo "<table border='1'>\n";
  19. while ($row = oci_fetch_array($array,OCI_ASSOC+OCI_RETURN_NULLS)) {
  20. echo "<tr>\n";
  21. foreach ($row as $item) {
  22. echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "&nbsp;") .
  23. "</td>\n";
  24. }
  25. echo "</tr>\n";
  26. }
  27.  
  28.  
  29.  
  30. oci_close($connection);
  31. ?>
  32.  
  33.  
  34.  
  35. </body>
  36.  
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement