Undefined index: selected in C:\xampp\htdocs\projekt\rpj\index-test.php on line 43

Second query not work...

 <form method="post">
    <select name="selected" onChange="MM_jumpMenu('parent',this,1)">
    // 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>';

    // query NOT WORK
    $sql1="SELECT * FROM lekcia1 WHERE id='".$_POST['selected']."'"; // Notice: Undefined index:selected
    $result1=mysql_query($sql1) or die(mysql_error($db));

    <li><?php echo $recording['nazov_lekcie'];?></li>
    <li><?php echo $recording['cislo_ulohy'];?></li>
    <li><?php echo $recording['nazov_ulohy'];?></li>

it is hard to explain,but i need echo row from db and GIVE TI TO web page.
some easy explain how it should work

<select name="yourselectbox" id="yourselectbox">
            <option value="something1">Option 1</option>
            <option value="something2">Option 2</option>
            <option value="something1">Option 3</option>

User choose value 2 and webpage will be update with data by 2. row in DB. I have no idea how to do it.
I need some conditions which will ensure it...

please someone i really need solve this problem thx.

Hi guys, i need selected option value of a drop down list will refresh index page and change data with row by ID from Database which user choose. It is test for imagine.

hint: number of id = number of question
look at DB - Click Here

i have some code which can maybe help, thanx for every help...

<form action="yourpostedtopage.php" method="post">
<select name="yourselectbox" id="yourselectbox">
            <option value="something1">Option 1</option>
                        <option>Option 2</option>
<input name="submitbutton" type="submit" value="submit" />


$selectedoption = $_POST['yourselectbox'];
echo $selectedoption;
mysql_query(".... WHERE column = '$selectedoption' ... ")