Second query not work...
<form method="post">
<select name="selected" onChange="MM_jumpMenu('parent',this,1)">
<?php
// echo all id in table to options dropdown menu**
$sql='SELECT id FROM lekcia1';
$result=mysql_query($sql) or die(mysql_error($db));
$a = 0;
while ($recording=mysql_fetch_array($result)){
$a ++;
echo '<option value="'.$recording['selected'].'"> '.$a.' </option>';
};
?>
</select>
</form>
<?php
// query NOT WORK
$sql1="SELECT * FROM lekcia1 WHERE id='".$_POST['selected']."'"; // Notice: Undefined index:selected
$result1=mysql_query($sql1) or die(mysql_error($db));
$recording1=mysql_fetch_array($result1);
?>
<ul>
<li><?php echo $recording['nazov_lekcie'];?></li>
<li><?php echo $recording['cislo_ulohy'];?></li>
<li><?php echo $recording['nazov_ulohy'];?></li>
</ul>