Page 1 of 1

how to send a value upon clicking on drop down menu?

Posted: Thu Oct 30, 2008 5:23 am
by vidyabhushan
i have created a drop down menu. Now what i want to do is upon clicking on one of the value in the menu and submit the form along with that selected value i want to send one more value along with that.....
here is my code.....

Code: Select all

 
<?
$qry = "select test_id, user_id from QDescr_4Eval";
    $result = mysql_query($qry);
?>
<form action = "evaluation_page_exec.php" method = "post">
    <div align = "center"><table>
    <th></th>
    <tr>
    <h2>Tests available for Evaluation</h2>
    <td>
    <select name="test_id" id="Test" class="" tabindex="14"><option value = "">(Test_id), (User_id)</option>
<?
    while($row = mysql_fetch_row($result)) {
        if($t_id == $row[0] && $u_id == $row[1]) {
            ;
        }
        else {
            echo "<option value = $row[0] >$row[0], $row[1]"; 
            
            $t_id = $row[0];
            $u_id = $row[1];
        }
        
    }
?>
    </select>
    </td>
<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
    <td>
    <input type = 'submit' name = 'submit' value = 'Submit'></input>
    </td>
    </tr>
    </form>
    </table></div>
 
As and when i click on a particular test_id the corresponding user_id also should be sent to the evaluation_page_exec.php page.... how to send two value with one option clicked....