hi all,
In my page i had a highest education qualification section and 2nd Highest Qualification
1.In HIghest qualification i had course and Year of pass as dropdown fields
2 In 2nd Highest qualification i had course and Year of pass as dropdown fields same as highest qualification.
Now i had inserted the selected values into database.They will be stored in Education details table as two rows.
Here is my problem I had some Edit page where i need to show these two rows as selected in dropdown but i am not getting it... so can any one help me please..
i tried this.
<?php $query2= mysql_query("SELECT * FROM Education where Emp_No='$id'");
mysql_error();
$num2=mysql_num_rows($query2);
$j=0;
while ($j < $num2){
$f1=mysql_result($query2,$j,"Course");
$f2=mysql_result($query2,$j,"Pass_year");
?>
<tr>
<td align="right"> Course: </td>
<td align="left">
<select name="course1" onchange="javascript: ToogleTextbox(this.value == '');" >
<option value="<?php echo $f1;?>" selected="selected"><?php echo $f1;?> </option>
<option value="12th">12th</option>
<option value="Aviation">Aviation</option>
<option value="B.A">B.A.</option>
<option value="B.Arch">B.Arch</option>
<option value="B.Com">B.Com</option>
</select>
</td>
</tr>
<tr>
<td align="right"> Year Of Passing: </td>
<td align="left"><select name="yearofpassing1" id="year1">
<option value="<?php echo $f2;?>" selected="selected"><?php echo $f2;?></option>
<option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option>
</td>
</tr>
<tr>
<td align="right"> Course: </td>
<td align="left">
<select name="course2" onchange="javascript: ToogleTextbox(this.value == '');" >
<option value="<?php echo $f1;?>" selected="selected"><?php echo $f1;?> </option>
<option value="12th">12th</option>
<option value="Aviation">Aviation</option>
<option value="B.A">B.A.</option>
<option value="B.Arch">B.Arch</option>
<option value="B.Com">B.Com</option>
</select>
</td>
</tr>
<tr>
<td align="right"> Year Of Passing: </td>
<td align="left"><select name="yearofpassing2" id="year2">
<option value="<?php echo $f2;?>" selected="selected"><?php echo $f2;?></option>
<option value="2010">2010</option><option value="2009">2009</option><option value="2008">2008</option><option value="2007">2007</option>
</td>
</tr>
<?php
$j++;
}
?>
thank u....