Basically what I am looking to do is populate a dropdown box from the contents of a mysql_array into a dropdown box...after the user makes a selection and submits the form the dopdown box will not contain the selection they just used....This form will have to be submitted mutiple times...I can get it to work no problem if it was just submitted once...so for multiple times i was trying to put what they had already used into an array and then compare that against the mysql_array so the already selected items wont appear again....this is what i have and i might be way off...
$_SESSION['name']=array();
array_push($_SESSION['name'],$_POST['selEmpl']);
function e(){
$sql="select name from IMSemploy ORDER BY name ASC";
$results=mysql_query($sql) or die(mysql_error());
echo"<select name=\"selEmpl\" size=\"1\">";
?><option value="Select">Select</option> <?
foreach ($_SESSION['name'] as $value){
while ($row = mysql_fetch_array($results)){
if($row['name']!=$value){
echo'<option value="'.$row['name'].'">'.$row['name'].'</option>';
}
}
}
echo'</select>';
}