I have a record update form that is not displaying the correct employee that is selected from a different web page.

It will display the correct month, but not the correct employee name.

Can someone show me where I'm going wrong?

PHP Code:
$editFormAction $_SERVER['PHP_SELF'];
if (isset(
$_SERVER['QUERY_STRING'])) {
  
$editFormAction .= "?" htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset(
$_POST["MM_update"])) && ($_POST["MM_update"] == "form2")) {
  
$updateSQL sprintf("UPDATE employee SET staff_id=%s, empl_month=%s WHERE empl_id=%s",
                       
GetSQLValueString($_POST['staff_id'], "int"),
                       
GetSQLValueString($_POST['empl_month'], "text"),
                       
GetSQLValueString($_POST['staff_id'], "int"));

  
mysql_select_db($database_wvgsadmin$wvgsadmin);
  
$Result1 mysql_query($updateSQL$wvgsadmin) or die(mysql_error());

  
$updateGoTo "eotm_list.php";
  if (isset(
$_SERVER['QUERY_STRING'])) {
    
$updateGoTo .= (strpos($updateGoTo'?')) ? "&" "?";
    
$updateGoTo .= $_SERVER['QUERY_STRING'];
  }
  
header(sprintf("Location: %s"$updateGoTo));
}

$colname_getEotm "-1";
if (isset(
$_GET['empl_id'])) {
  
$colname_getEotm $_GET['empl_id'];
}
mysql_select_db($database_wvgsadmin$wvgsadmin);
$query_getEotm sprintf("SELECT * FROM employee WHERE empl_id = %s"GetSQLValueString($colname_getEotm"int"));
$getEotm mysql_query($query_getEotm$wvgsadmin) or die(mysql_error());
$row_getEotm mysql_fetch_assoc($getEotm);
$totalRows_getEotm mysql_num_rows($getEotm);

mysql_select_db($database_wvgsadmin$wvgsadmin);
$query_getStaff "SELECT staff_name, staff_photo FROM staff";
$getStaff mysql_query($query_getStaff$wvgsadmin) or die(mysql_error());
$row_getStaff mysql_fetch_assoc($getStaff);
$totalRows_getStaff mysql_num_rows($getStaff);
?> 
HTML Code:
<form method="post" name="form2" action="<?php echo $editFormAction; ?>">
<table align="center">
<tr valign="baseline">
<td nowrap align="right">Employee Name:</td>
<td><select name="staff_id" id="staff_id">
<?php
do {  
?>
<option value="<?php echo $row_getStaff['staff_name']?>"<?php if (!(strcmp($row_getStaff['staff_name'], $row_getEotm['staff_id']))) {echo "selected=\"selected\"";} ?>><?php echo $row_getStaff['staff_name']?></option>
<?php
} while ($row_getStaff = mysql_fetch_assoc($getStaff));
  $rows = mysql_num_rows($getStaff);
  if($rows > 0) {
      mysql_data_seek($getStaff, 0);
	  $row_getStaff = mysql_fetch_assoc($getStaff);
  }
?>
</select>
</td>
<tr>
<tr valign="baseline">
<td nowrap align="right">Date:</td>
<td><select name="empl_month" value="<?php echo $row_getEotm['empl_month']; ?>">
<option value="January" <?php if (!(strcmp("January", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>January</option>
<option value="February" <?php if (!(strcmp("February", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>February</option>
<option value="March" <?php if (!(strcmp("March", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>March</option>
<option value="April" <?php if (!(strcmp("April", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>April</option>
<option value="May" <?php if (!(strcmp("May", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>May</option>
<option value="June" <?php if (!(strcmp("June", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>June</option>
<option value="July" <?php if (!(strcmp("July", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>July</option>
<option value="August" <?php if (!(strcmp("August", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>August</option>
<option value="September" <?php if (!(strcmp("September", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>September</option>
<option value="October" <?php if (!(strcmp("October", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>October</option>
<option value="November" <?php if (!(strcmp("November", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>November</option>
<option value="December" <?php if (!(strcmp("December", $row_getEotm['empl_month']))) {echo "SELECTED";} ?>>December</option>
</select>
</td>
</tr>
<tr valign="baseline">
<td nowrap align="right">&nbsp;</td>
<td><input type="submit" value="Update record"></td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="empl_id" value="<?php echo $row_getEotm['empl_id']; ?>">
</form>
Thank you for looking at this for me!
toad78