Advertisement
Guest User

halp

a guest
Jan 17th, 2017
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>User Info</title>
  6. </head>
  7. <body>
  8. <h1>LIST OF DETAILS:</h1>
  9. <table>
  10. <thead>
  11. <tr>
  12. <td>Username</td>
  13. <td>Email</td>
  14. <td>Address</td>
  15. <td>Phone</td>
  16. <td>Bio</td>
  17. </tr>
  18. </thead>
  19. <tbody>
  20. <?php
  21. $dbconn = pg_connect("host = localhost dbname=test1 user=test1 password=1kozlovsas")
  22. or die("Could not connect");
  23.  
  24.  
  25. echo "Connection success.";
  26. //$res;
  27. //$rec = pg_select($dbconn, 'ass1data', $res);
  28. //var_dump($res);
  29. $res = pg_prepare($dbconn, "my_query", 'SELECT username FROM ass1dat WHERE username = $1');
  30. $res = pg_execute($dbconn, "my_query", array($_POST["username"]));
  31. //$res = pg_query_params($dbconn, 'SELECT username FROM ass1dat where username = $_POST["username"]');
  32. ?>
  33.  
  34. <tr><?php echo $res; ?></tr>
  35. </tbody>
  36. </table>
  37.  
  38. </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement