How to show record from mysql to radio button and do update
Posted: Fri Sep 30, 2005 2:45 pm
I have problem woth my form.. i only can retrieve the textarea field and textbox ..
But how do i retrieve data to the radio button..
can anyone please help me..
But how do i retrieve data to the radio button..
Code: Select all
<?php
mysql_select_db($conn);
$row = mysql_fetch_array(mysql_query("SELECT a.*, b.fullname, c.papertitle FROM evaluation a, tbl_auth_user b, citapapers c where (a.login='$login' and a.paperid=$paperid) and a.login=b.login and a.paperid=c.paperid"));
echo "<tr>
<td bordercolor=#999999 bgcolor=#00CC33><font size=-1 face=Arial, Helvetica, sans-serif><b>Reviewer Name</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif><b>:</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif>$row[fullname]</font></td>
</tr>";
echo "<tr>
<td bordercolor=#999999 bgcolor=#00CC33><font size=-1 face=Arial, Helvetica, sans-serif><b>Paper No.</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif><b>:</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif><b>$row[paperid]</b></font></td>
</tr>";
echo "<tr>
<td bordercolor=#999999 bgcolor=#00CC33><font size=-1 face=Arial, Helvetica, sans-serif><b>Paper Title</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif><b>:</b></font></td>
<td><font size=-1 face=Arial, Helvetica, sans-serif>$row[papertitle]</font></td>
</tr>";
?>
</font> </table>
<p><font face="Arial, Helvetica, sans-serif"><br>
<strong><font size="-1">Instruction: Please select your answer from the
following questions.</font></strong> </font>
<br>
<hr align="center" width="80%" noshade>
<table cellspacing="0" cellpadding="0">
<tr>
<td valign="top" class="style16 style3 style5">1.</td>
<td colspan="2" valign="top" class="style16 style3 style5">Does the title accurately reflect the content?</td>
</tr>
<tr>
<td width="16" valign="top" class="style16 style3 style5"><p align="center"><strong> </strong></p></td>
[b] <td width="21" valign="top" class="style16 style3 style5"> <input type="radio" name="q1" value="1" id="q1"></td>[/b] <td width="726" valign="top" class="style16 style3 style5"><p>Not At All </p></td>
</tr>
<tr>
<td width="22" valign="top" class="style16 style3 style5"><p align="center"><strong> </strong></p></td>
<td width="20" valign="top" class="style16 style3 style5"><input type="radio" name="q15" value="0" id="q15"></td>
<td width="721" valign="top" class="style16 style3 style5"><p>No</p></td>
</tr>
<tr>
<td width="22" valign="top" class="style16 style3 style5"><p align="center"><strong> </strong></p></td>
<td width="20" valign="top" class="style16 style3 style5"> </td>
<td width="721" valign="top" class="style16 style3 style5"></td>
</tr>
</table>
<tr>
<td valign="top" class="style12"><p align="left" class="style15 style3 style5">Please give your comments here: </p> </td>
</tr>
<tr>
<td height="117" valign="top"><p align="left">
<span class="style10">
<textarea name="comment" cols="100" rows="5" id="comment" ><?php print "$row[comment]"?></textarea>
</span><span class="style10"> </span><span class="style13"> </span><span class="style13"> </span> </p>
<blockquote>
<p>
<input type="submit" name="Update" value="Update">
</p>
</blockquote>
</form>