Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Site Beta Signed List</title>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" href="style.css" type="text/css" />
- </head>
- <body>
- <div id="outer">
- <div id="wrap">
- <div id="title">List of people signed in already</div>
- <div id="header"></div>
- <div class ="content">
- <h1>List of people signed in so far: </h1>
- <br>
- <?php
- $db = pg_connect('host=localhost dbname=database user=dzwiedziu password=power5');
- $query = "SELECT * FROM users";
- $result = pg_query($query);
- if (!$result) {
- echo "Problem with query " . $query . "<br/>";
- echo pg_last_error();
- exit();
- }
- while($myrow = pg_fetch_assoc($result)) {
- printf ("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>", $myrow['id'], htmlspecialchars($myrow['firstname']), htmlspecialchars($myrow['lastname']), htmlspecialchars($myrow['email']));
- }
- ?>
- <br>
- <form action="index.html">
- <input type="submit" value="Go back to sign in!">
- </form>
- <br>
- <div id="footer">
- Michał Tulejko 2016
- </div>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement