<td width="30%"><font color="#000033"><strong>
<?=$title?>
</strong></font></td>
</tr>
<tr >
<td><div align="right"><font color="#000033" size="+2"><strong>User:</strong></font></div></td>
<td><font color="#000033"><b>
<?=$name?>
</b></font></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<tr >
<td><div align="left"><font color="#000033" size="+2"><strong>Вопрос</strong></font></div></td>
<td><div align="left"><font color="#000033"><strong><font size="+2">Ответ</font></strong></font></div></td>
</tr>
<?
while($l = mysql_fetch_assoc($result)){
$sql = "SELECT `text` FROM `quest` WHERE `id` = " .$l['idquest'];
$rez = @mysql_query($sql);
$quest = @mysql_result($rez,0);
?>
<tr >
<td><div align="left"><font color="#000033">
<?=$quest?>
</font></div></td>
<td><div align="left"><font color="#000033">
<?=$l['answer']?>
</font></div></td>
</tr>
<? } ?>
</table>
<? }
function listank() {
$sql = "SELECT * FROM `ank`";
$result = @mysql_query($sql);
if(mysql_num_rows($result))
{
echo "<p>Выберите анкету для просмотра результатов </p>";
while($ank=mysql_fetch_assoc($result))
{
$str = "<li><a href='index.php?answers&showank=" .$ank['idank'] ."'>" .$ank['title']."</a>";
echo $str;
}
echo "<br><br><br>";
}
else
echo "В БД нет анкет";
}
?>
Рис 4.1 Форма прохождения анкетирования