Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta charset="UTF-8">
- <title>List of Users</title>
- </head>
- <body>
- <h1>Pick a user. Any user. I dare you.</h1>
- <table>
- <thead>
- <tr>
- <td>Usernames:</td>
- </tr>
- </thead>
- <tbody>
- <?php
- $dbconn = pg_connect("host = localhost dbname=test1 user=test1 password=1kozlovsas")
- or die("Could not connect");
- echo "Connection success.";
- $res = pg_query_params($dbconn, 'SELECT username FROM ass1data');
- while($row = pg_fetch_result($res, "username")) {
- <tr>
- <form action="userdetails.html" method="POST">
- <td>
- <input type = "submit" name="user" value="$row" class="btn-link" label="$row">
- </form>
- </td>
- </tr>
- }
- ?>
- </tbody>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement