daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Oct 17th, 2017 311 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3.     echo "<table class='admin-table'  data-tableName='Test Table 1'>
  4. <tr><th class=id>Номер</th>
  5. <th>Тема</th>
  6. <th>Имя</th>
  7. <th>Телефон</th>
  8. <th>Почта</th>
  9. <th>Дата</th>
  10. </tr>";
  11.  
  12.  
  13. $servername = "localhost";
  14. $username = "proac144_dd";
  15. $password = "aFMx~^bCa~Zk";
  16. $dbname = "proac144_vote";
  17.  
  18. // Create connection
  19. $conn = new mysqli($servername, $username, $password, $dbname);
  20.  
  21. // Check connection
  22. if ($conn->connect_error) {
  23.     die("Connection failed: " . $conn->connect_error);
  24. }
  25.  
  26. $sql = "SELECT  number,name,person,a1,a2,a3,a4,a5,a6,a7,a8,a9,a10 FROM vote";
  27. $result = $conn->query($sql);
  28.  
  29. if ($result->num_rows > 0) {
  30.     // output data of each row
  31.     while($row = $result->fetch_assoc()) {
  32.         echo
  33.  
  34.           "<tr>".
  35.             "<td class=id> " .  $row["number"]. "</td> " .
  36.             "<td> " .  $row["name"]. "</td> " .
  37.             "<td> " .  $row["person"]. "</td> " .
  38.             "<td> " .  $row["a1"]. "</td> " .
  39.             "<td> " .  $row["a2"]. "</td> " .
  40.             "<td> " .  $row["a3"]. "</td> " .
  41.             "<td> " .  $row["a4"]. "</td> " .
  42.             "<td> " .  $row["a5"]. "</td> " .
  43.             "<td> " .  $row["a6"]. "</td> " .
  44.             "<td> " .  $row["a7"]. "</td> " .
  45.             "<td> " .  $row["a8"]. "</td> " .
  46.             "<td> " .  $row["a9"]. "</td> " .
  47.             "<td> " .  $row["a10"]. "</td> " .
  48.  
  49.  
  50.  
  51.  
  52.             "</tr>";
  53.     }
  54. } else {
  55.     echo "0 results";
  56. }
  57. $conn->close();
  58. echo "</table>";
  59. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top