Advertisement
Guest User

Untitled

a guest
Mar 28th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. <?php
  2.  
  3. ini_set('display_errors', 1);
  4. error_reporting(E_ALL ^ E_NOTICE);
  5.  
  6.  
  7. $host = "xxxxxxx";
  8. $user = "xxxxxx";
  9. $pass = "xxxxxx";
  10. $db = "xxxxxx";
  11.  
  12. $conn = mysqli_connect($host, $user, $pass, $db);
  13.  
  14.  
  15.  
  16.  
  17. $sql = "SELECT QUESTION,CHOICE FROM ExamQuestions";
  18. $res = mysqli_query($conn, $sql);
  19.  
  20. if ($res->num_rows > 0) {
  21. // output data of each row
  22. while($row = $res->fetch_assoc()) {
  23. /echo "QUESTION: " . $row["QUESTION"]. "<br>";
  24. echo"<input type = 'checkbox' name=''";
  25.  
  26. //if (isset($_POST['CHOICE'])) { echo " value='checked'";}
  27. //echo $row->CHOICE ;
  28. }
  29. } else {
  30. echo "0 results";
  31. }
  32. $conn->close();
  33.  
  34.  
  35. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement