Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- error_reporting(E_ALL ^ E_NOTICE);
- $host = "xxxxxxx";
- $user = "xxxxxx";
- $pass = "xxxxxx";
- $db = "xxxxxx";
- $conn = mysqli_connect($host, $user, $pass, $db);
- $sql = "SELECT QUESTION,CHOICE FROM ExamQuestions";
- $res = mysqli_query($conn, $sql);
- if ($res->num_rows > 0) {
- // output data of each row
- while($row = $res->fetch_assoc()) {
- /echo "QUESTION: " . $row["QUESTION"]. "<br>";
- echo"<input type = 'checkbox' name=''";
- //if (isset($_POST['CHOICE'])) { echo " value='checked'";}
- //echo $row->CHOICE ;
- }
- } else {
- echo "0 results";
- }
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement