che_anj
08-23-2006, 03:38 AM
Heres the code:
$query="select p.sub_code,p.term, from prosdetails p, subject s,prospectus r where p.prosno='$prosno' and p.sub_code=s.sub_code and r.prosno=p.prosno";
$result=mysql_query($query);
echo '<tr><td>Subjects</td><td></td><td>List of Prequisites to be add</td><td></td><td>Pre-requisites</td></tr>';
while($row=mysql_fetch_array($result))
{
echo '<tr><td bgcolor="white">
<input type="text" readonly="readonly" size="16" name="subcode[]"
value="'.$row[sub_code].' "></td>
<td>
<select name="">
echo "<option value='".$row[sub_code]."'>".$row[sub_code]."</option>";
</select>
</td>
}
Lets assume that there are 10 subjects results
therefore there are 10 textboxes and 10 combo boxes
Every textbox has 1 subject result, my Problem is in the 10 combo boxes I want that there are also 10 subjects every combo boxes.
$query="select p.sub_code,p.term, from prosdetails p, subject s,prospectus r where p.prosno='$prosno' and p.sub_code=s.sub_code and r.prosno=p.prosno";
$result=mysql_query($query);
echo '<tr><td>Subjects</td><td></td><td>List of Prequisites to be add</td><td></td><td>Pre-requisites</td></tr>';
while($row=mysql_fetch_array($result))
{
echo '<tr><td bgcolor="white">
<input type="text" readonly="readonly" size="16" name="subcode[]"
value="'.$row[sub_code].' "></td>
<td>
<select name="">
echo "<option value='".$row[sub_code]."'>".$row[sub_code]."</option>";
</select>
</td>
}
Lets assume that there are 10 subjects results
therefore there are 10 textboxes and 10 combo boxes
Every textbox has 1 subject result, my Problem is in the 10 combo boxes I want that there are also 10 subjects every combo boxes.