I am doing questionnaire on php, I am new to php. When I try to show the answers, it only shows the first two questions. After the two questions, answers are not shown. I have attached the source here.
Please use the following link to view the page.
http://itsupportsrilanka.com/uaquiz/quiz.php
<body>
<form action="test.php" method="POST">
<?php
$result = select("SELECT * FROM questions ");
//$row = mysql_fetch_array($result);
?>
<?php
$i=1;
while($row = mysql_fetch_array($result))
{
?>
<table width="581" height="299" border="1">
<tr>
<td>Union Assurance Questionnaire</td>
</tr>
<tr>
<td><?php echo $i.'.' .$row['questions']; ?>
<?php $i++; ?>
</td>
</tr>
<tr>
<td>
<?php $qId=$row['question_id'];
$result1=select("SELECT * FROM answers WHERE questionId='$qId' ORDER BY RAND()");
while($row1=mysql_fetch_array($result1)){
?>
<input type="radio" name="answers" value="<?php echo $row1['answers'];?>" / ><?php echo $row1['answers']; ?><br/>
<?php
} ?>
</td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<?php
}
?>
</form>
</body>


Replace
and
and try again