need to change radio inputs to dropdowns...
Posted: Sat Sep 20, 2003 8:43 pm
kind folks - i'm still learning this wonderful language but have an issue i need to overcome a little more quikly than i can do myself - these are the ways i learn this stuff anyway...
i need to turn these radio buttons into dropdowns, can someone please get me started so i can see what needs to be done? --->
i very much appreciate it...
g
i need to turn these radio buttons into dropdowns, can someone please get me started so i can see what needs to be done? --->
Code: Select all
<?
$inceput=5*$indice;
$query="select DISTINCT question.id,question.questions from question,responses where question.id=responses.id_questionsorder by question.ordine LIMIT $inceput,5";
$resultQuestion=mysql_query($query) or die($query. mysql_error());
$nQuestion=mysql_num_rows($resultQuestion);
if ($nQuestion)
{
?>
<div align="center"><center><table border="0" width="96%">
<form name="inscriere" action="add_question.php" method="post">
<input type="hidden" name="id" value="<?=$id?>">
<input type="hidden" name="indice" value="<?=$indice?>">
<tr><td height="5"> </td></tr>
<?
for($i=0;$i<$nQuestion;$i++)
{
$item=mysql_fetch_object($resultQuestion);
?>
<tr><td><strong><?=$item->questions?></strong></td></tr>
<?
$query="select * from responses where id_questions=$item->id";
$resultResponses=mysql_query($query) or die($query. mysql_error());
$nResponses=mysql_num_rows($resultResponses);
for($j=0;$j<$nResponses;$j++)
{
$data=mysql_fetch_object($resultResponses);
?>
<tr><td valign="top">
<input type="radio" name="questions<?=$item->id?>" value="<?=$data->id?>" <?=(isset(${questions.$item->id}))?"CHECKED":""?>><?=$data->raspuns?>
</td></tr>
<tr><td valign="top">
<br>
<br>
</td></tr>
<?
}
?>
<tr><td height="5"> </td></tr>
<?
}
?>g