well, I'm showing all the records in a list box from a table.On selection of a record in this listbox, the corresponding records has to be displayed.
well, there are 2 tables:themes, subthemes:
In themes there are:theme_id, theme_name
In subthemes there are:subthemes_id, theme_id, subthemes_name.
At first, I'm displaying theme_name, on selecting any record the corresponding subthemes names are to be listed.How can i do this??
So far, I'm done with my first part, how can i proceed with the second one.
Many thanks
Here is my code:
<?
$sql = "SELECT THEME_NAME FROM themes";
$result = mysql_query($sql);
?>
<form>
<SELECT NAME="Select1" SIZE="1">
<?
while ($items = mysql_fetch_array($result))
{
?>
<OPTION VALUE="<? echo $items['THEME_NAME'] ?>">
<? echo $items['THEME_NAME'] ?>
</OPTION>
<?
}
?>
</SELECT><BR>
</form>