[eluser]Flemming[/eluser]
Great! So now the input box is showing the correct name when you change the select?
Check this:
Code:
foreach($groups as $row)
{
echo '<option value="'.$row->employee_name.'">'.$row->employee_name.'</option>';
}
You are using employee_name as the option value, so that is what will get inserted into the input box. You will need to change the option value to $row->employee_id (or whatever the ID field is called in the database)