Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- $host = "xxxx";
- $user = "xxx";
- $pass = "xxx";
- $db = "xxxxxx;
- $conn = mysqli_connect($host, $user, $pass, $db);
- if(!$conn)
- {
- die("Connection Failed: " . mysqli_connect_error());
- }
- $sql = "SELECT QId, Question FROM Questions";
- $result = mysqli_query($conn, $sql);
- echo " <form action='create.php> ";
- if (mysqli_num_rows($result) > 0)
- {
- // output data of each row
- while($row = mysqli_fetch_assoc($result))
- {
- echo " <label><input type='checkbox' id='Questions' value='".$row['QId']."'>".$row['Question']."</label><br>";
- }
- }
- else
- {
- echo "0 results";
- }
- echo "<input type='submit' value='Submit'>";
- echo " </form>";
- $conn->close();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement