i have a page in which i am using a dropdown menu. i have passed a variable in the name field of the select tag whose value comes from an array.
$query1="Select SSAP from project where projname='$project'";
$result=mysql_query($query1);
while($row=mysql_fetch_assoc($result))
{
$ssap = $row['SSAP'];
$query2="Select * from student where SSAP='$ssap'";
$res=mysql_query($query2);
$row1=mysql_fetch_assoc($res);
$name=$row1['name'];
echo $name; ?> <select name="<?php echo $name;?>">
<option value="A"> Exceptional </option>
<option value="B"> Highly Effective </option>
<option value="C"> Effective </option>
<option value="D"> Good </option>
<option value="E"> Not Satisfactory </option>
</select> <br> <?php
}
and i need to retrive the value of each select tag created in another variable on the action page.
$grade=$_POST[$name];
echo $grade;
the first code snippet works fine but i am unable to fetch the value in the second snippet.