fork download
  1.  
  2.  
  3. <?php require_once("includes/connection.php"); ?>
  4. <?php
  5. $sql = "SELECT username, password FROM usertbl";
  6. $result = $mysqli->query($sql) or die(mysql_error());
  7.  
  8. $array = array();
  9.  
  10. while($row = mysqli_fetch_array($result)) {
  11. $array[] = $row[0];
  12. $array1[] = $row[1];
  13. }
  14.  
  15. ?>
  16. <!DOCTYPE html>
  17. <html>
  18. <head>
  19. <title>Bootstrap 101 Template</title>
  20. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  21. <!-- Bootstrap -->
  22. <link href="css/bootstrap.min.css" rel="stylesheet" media="screen">
  23.  
  24. <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
  25. <!--[if lt IE 9]>
  26. <script src="../../assets/js/html5shiv.js"></script>
  27. <script src="../../assets/js/respond.min.js"></script>
  28. <![endif]-->
  29. </head>
  30. <body>
  31. <table class="table">
  32. <thead>
  33. <tr>
  34. <th scope="col">Login</th>
  35. <th scope="col">password</th>
  36.  
  37.  
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <tr>
  42. <?php for($i=0;$i< count($array);$i++){
  43.  
  44. echo '<td>';
  45. print_r($array[$i]);
  46.  
  47. echo '</td>';
  48. }
  49. ?>
  50. </tr>
  51. <tr>
  52. <?php for($i=0;$i< count($array);$i++){
  53.  
  54.  
  55. echo '<td>';
  56. print_r($array1[$i]);
  57. echo '</td>'; }
  58.  
  59. ?>
  60. </tr>
  61.  
Runtime error #stdin #stdout #stderr 0s 82560KB
stdin
Standard input is empty
stdout

stderr
PHP Warning:  require_once(includes/connection.php): failed to open stream: No such file or directory in /home/76mBKL/prog.php on line 3
PHP Fatal error:  require_once(): Failed opening required 'includes/connection.php' (include_path='.:/usr/share/php') in /home/76mBKL/prog.php on line 3