while ($record=mysql_fetch_row($submenu))
{
echo"<li><a href='#'>".$record[2]." </a></li>\n"; // Dropdown from items (subgroepsoorten)
// *** I think here should be some kind of clickable and general query to create automatically a list of the selected item }
I think you might be looking for something like this:
echo("<select name='dropdown'>");
while ($record=mysql_fetch_row($submenu))
{
echo("<option value='".$record[2]."'>".$record[2]."</option>");
}
echo("</select>");
However, this should be included in a form, which, once submitted, will pass the value of the selected item.
Of course you can write the pure html parts (such as the select tag) outside php code, I just wrote the first code that came across my mind.