Code: Select all
//Used for the employee menu and evaluations left to be completed
$employee_list="SELECT * FROM employees";
$total_employees=mysql_query($employee_list);
$employees_left=mysql_numrows($total_employees);
$eval_remaining=($employees_left - $eval_complete);
//Evaluates a variable for 'state' == 1
$state = mysql_query('SELECT state FROM employees');
$state_menu=mysql_result($state,"state");
if ($employees_left==0)
{
echo "<option>--No employees in database--</option>";
}
else
{
$count=0;
while ($count < $employees_left && $state_menu == '1') {
$name_menu=mysql_result($total_employees,$count,"name");
echo "<option>$name_menu</option>";
$count++;
}
}Code: Select all
while ($count < $employees_left && $state_menu == '1')Code: Select all
Name | State
------------------
Tristan | 1
Ben | 0
Aaron | 1Code: Select all
<option>Tristan</option>Code: Select all
<option>Aaron</option>Code: Select all
<option>Ben</option>I'm sure you guys can think of something to make this simple and make it work. I've been up too long. Thanks in advance.