Advertisement
Guest User

Untitled

a guest
Jan 17th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title>List of Users</title>
  5. </head>
  6. <body>
  7. <h1>Pick a user. Any user. I dare you.</h1>
  8. <table>
  9. <thead>
  10. <tr>
  11. <td>Usernames:</td>
  12. </tr>
  13. </thead>
  14. <tbody>
  15. <?php
  16. $dbconn = pg_connect("host = localhost dbname=test1 user=test1 password=1kozlovsas")
  17. or die("Could not connect");
  18.  
  19. echo "Connection success.";
  20.  
  21. $res = pg_query_params($dbconn, 'SELECT username FROM ass1data');
  22. while($row = pg_fetch_result($res, "username")) {
  23.  
  24. <tr>
  25. <form action="userdetails.html" method="POST">
  26. <td>
  27. <input type = "submit" name="user" value="$row" class="btn-link" label="$row">
  28. </form>
  29. </td>
  30. </tr>
  31.  
  32. }
  33. ?>
  34.  
  35.  
  36. </tbody>
  37. </table>
  38.  
  39. </body>
  40. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement