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
- $dbconn = pg_connect("host = localhost dbname=test1 user=test1 password=1kozlovsas")
- or die("Could not connect");
- echo "Connection success.";
- //$res;
- //$rec = pg_select($dbconn, 'ass1data', $res);
- //var_dump($res);
- $res = pg_prepare($dbconn, "my_query", 'SELECT username FROM ass1dat WHERE username = $1');
- $res = pg_execute($dbconn, "my_query", array($_POST["username"]));
- //$res = pg_query_params($dbconn, 'SELECT username FROM ass1dat where username = $_POST["username"]');
- ?>
- <tr><?php echo $res; ?></tr>
- </tbody>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement