Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>User Info</title>
- </head>
- <body>
- <h1>LIST OF DETAILS:</h1>
- <table>
- <thead>
- <tr>
- <td>Username</td>
- <td>Email</td>
- <td>Address</td>
- <td>Phone</td>
- <td>Bio</td>
- </tr>
- </thead>
- <tbody>
- <?php
- $host = "localhost";
- $user = "test1";
- $pass = "test1*";
- $db = "1kozlovsas";
- $con = pg_connect("host=$host dbname=$db user=$user password=$pass")
- or die ("Could not connect to server\n");
- $query = "SELECT username FROM ass1dat";
- $rs = pg_query($con, $query) or die("Cannot execute query: $query\n");
- while ($row = pg_fetch_row($rs)) {
- echo '<tr>
- <td>
- <a href="viewusername.php?username='.$row[0].'">
- <button type="button" class="btn btn-info">View Username</button>
- </a>
- </tr>';
- }
- pg_close($con);
- ?>
- </tbody>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement