Advertisement
Guest User

Untitled

a guest
Jun 25th, 2019
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. $dbServername = "localhost:8080";
  2. $dbUsername = "root";
  3. $dbPassword = "";
  4. $dbName = "tickets";
  5.  
  6. $conn = mysqli_connect($dbServername, $dbUsername, $dbPassword,
  7. $dbName);
  8.  
  9. <?php
  10. include_once 'dbh.php';
  11. ?>
  12.  
  13. <!DOCTYPE html>
  14. <html>
  15. <head>
  16. <title></title>
  17. </head>
  18. <body>
  19.  
  20. <?php
  21. $sql = "SELECT * FROM movie WHERE movie='hunter killer';";
  22. $result = mysqli_query($conn, $sql);
  23. $resultCheck = mysqli_num_rows($result);
  24.  
  25. if ($resultCheck > 0) {
  26. while ( $row = mysqli_fetch_assoc($result)) {
  27. echo $row['movie'] . "<br>";
  28. }
  29. }
  30. ?>
  31. </body>
  32. </html>
  33.  
  34.  
  35. i want my specific query to show, also my table in phpmyadmin is called movie and a variable is also called movie . my other programs have worked before but im not sure if this is affecting it .
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement