I just searched all over this forum for the past hour and still cannot figure it out. I use to be really good at PHP years ago...
Anyways, I am trying to populate a drop down box with a list of managers in a table called Employees.
Table structure is like this
ID, Employee_name, extension, manager
now the manager could have 10-15 employees, but I pulled a query that would just select the distinct managers.
I am trying to populate the drop down list with the managers from the table
this is what I have:
// mysql Connection.
$link = mysql_connect('localhost','root','');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
$db_connection = mysql_select_db('move_db', $link);
$Getmgrsql = "Select DISTINCT Manager FROM Employees";
$mgrQuery = mysql_query($Getmgrsql);
<select name="ddManager" id="ddManager">
<option><?php echo $mgrQuery; ?> </option>