Im new in PHP. I need to create a form that display a dropdown list that show the employees names that I have in a mysql table called employee. After have this dropdown list. I need that the select value from the dropdown list be inserted in another table. Here is what I have. I really apreciate your help.
echo '</tr><tr><td><label for="AssignedEmp"> Assigned Employee:</label></td><td>';
$query = "SELECT UserName, Classification_ClassificationID FROM employee";
$result = queryMysql($query);
if (Classification_ClassificationID =='2') {
while ($rows = mysqli_fetch_array($result)) {
<select name = "UserName" value="' . $rows['UserName'] . '" name="toinsert[]" />;
}
}