I have a table with data:
EMPNO ENAME GRADE
-------- ------- ---------
100 JACK A
101 JOHN B
103 TOM A
I need to create a select item that will list all the names. I want to be able to select one of the names from the drop down. I am passing the grade as a hidden element of the form. I don't want to follow the selection from the drop down with a submit button. Although the list is displaying the names, I really need the grade for further processing, although the name is also important. So, i figured the onchange : this.formname.submit(), might help. However I can't seem to understand where I am making a mistake. This is the code I've written. Do I need some additional javascript code somewhere. If so what do I write ?
In the php part that was written above the form, I wrote:
if (isset($_GET['emp_select']))
{
$grade=$_POST['grade'];
echo "grade is" . $grade;
}
However, it is not doing the echo part. Am I making a mistake somewhere. I need to get the grade for further processing on the form, and I needed it from the select.
Bookmarks