Advertisement
Guest User

Untitled

a guest
Jul 5th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.55 KB | None | 0 0
  1. <div class="well">
  2.  
  3. <?php
  4.  
  5. //MySQL Database Connect
  6. include '/includes/dbconnect.php';
  7.  
  8. $result = mysqli_query($conn,"SELECT * FROM webpilot ORDER BY NEXT_EVENT ASC");
  9.  
  10. if(mysqli_num_rows($result) >= 1) {
  11.  
  12. echo '<table class="table table-striped table-bordered table-hover">';
  13. echo "<tr><th>ID</th><th>NAME:</th><th>EPOCH</th></tr>";
  14. while($row = mysqli_fetch_array($results)) {
  15. echo "<tr><td>";
  16. echo $row['ID'];
  17. echo "</td><td>";
  18. echo $row['NAME'];
  19. echo "</td><td>";
  20. echo $row['NEXT_EVENT'];
  21. echo "</td></tr>";
  22. }
  23. echo "</table>";
  24. }
  25. ?>
  26. </div> <!-- well -->
  27.  
  28. <?php
  29.  
  30. $localhost="xxx.xx.xxx.com";
  31. $username="dboxxxxxxx";
  32. $password="xxxxxx";
  33. $database="dbxxxxxx";
  34.  
  35. $conn = mysqli_connect($localhost,$username,$password,$database);
  36.  
  37. //test if connection failed
  38. if(mysqli_connect_errno()){
  39. die("connection failed: "
  40. . mysqli_connect_error()
  41. . " (" . mysqli_connect_errno()
  42. . ")");
  43. }
  44. ?>
  45.  
  46. $result = mysqli_query($conn,"SELECT * FROM webpilot ORDER BY NEXT_EVENT ASC");
  47.  
  48. if(mysqli_num_rows($result) >= 1) {
  49.  
  50. echo '<table class="table table-striped table-bordered table-hover">';
  51. echo "<tr><th>ID</th><th>NAME:</th><th>EPOCH</th></tr>";
  52. //while($row = mysqli_fetch_array($results)) {
  53. ^^^^^^^^
  54. while($row = mysqli_fetch_array($result)) {
  55.  
  56. ini_set('display_errors', 1);
  57. ini_set('log_errors',1);
  58. error_reporting(E_ALL);
  59. mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); `
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement