Hi,
I new to php and am trying to echo information from a mysql database using php and a php whileloop but it ignores the first row. Could anybody explain to me what i a doing wrong?
$query=("SELECT question_id, question, distractor_1, distractor_2, distractor_3, distractor_4 FROM multiplechoice_db " );
$result = @mysqli_query ($dbcon, $query); // Run the query.
while($row = mysqli_fetch_array($result)):?>
<br>
<?php echo $row[‘question_id’];?>
<br>
<?php echo $row[‘question’];?>
<br>
<input type="radio" value="1" id=' distractor <?php echo $row['question_id'];?>' name ='<?php echo $row['question_id'];?>'/><?php echo $row['distractor_1'];?>
<br>
<input type="radio" value="2" id=' distractor <?php echo $row['question_id'];?>' name ='<?php echo $row['question_id'];?>'/><?php echo $row['distractor_2'];?>
<br>
<input type="radio" value="3" id=' distractor <?php echo $row['question_id'];?>' name ='<?php echo $row['question_id'];?>'/><?php echo $row['distractor_3'];?>
<br>
<input type="radio" value="4" id=' distractor <?php echo $row['question_id'];?>' name ='<?php echo $row['question_id'];?>'/><?php echo $row['distractor_4'];?>
<br>
<input type="radio" checked='checked' style='display:none' value="5" id='distractor <?php echo $row['question_id'];?>' name='<?php echo $row['question_id'];?>'/>
<br>
<?php endwhile;?>
<p> <input id=“submit” type=“submit” name=“submit” value="Click To Submit Completed Quiz "></>