Hi,
This option value drop down list code works fine for one row of data but will not give me the full list as extracted from my db on mulitple rows. Can anybody help me with this.
Many thanks,
Mike
$sql = "SELECT skill_hier_lev3.skl_lev3, skill_hier_lev3.description3 FROM skill_hier_lev3, skill_hier_lev2
WHERE skill_hier_lev3.skl_lev2 = skill_hier_lev2.skl_lev2
and skill_hier_lev3.skl_lev2 = '$skl_lev2'";
$sql_result = mysql_query($sql,$connection) or die ("Query Execute");
$sql2 = "SELECT FROM ability;";
$sql_result2 = mysql_query($sql2,$connection) or die ("Query Execute");
$num_rows = mysql_numrows($sql_result);
$sql3 = "SELECT FROM skill_system;";
echo "Number of available skills in the section is <b>$num_rows</b>";
echo "<table cellpadding=0 cellspacing=0 border=1 width=760 align=center>";
echo "
<tr><br>
<td align=\"center\" width=200>Description</td>
<td align=\"center\">Ability</td>
while ($row = mysql_fetch_array( $sql_result2 ) )
{
$ab_id = $row["ab_id"];
$description = $row["description"];
}
while ($row = mysql_fetch_array( $sql_result ) )
{
$skl_lev3 = $row["skl_lev3"];
$description3 = $row["description3"];
echo"
<tr>
<td>$description3 ($skl_lev3)</td>
<td><select name=ability>";
echo"
<option value=$ab_id>$description</option></select>";
}