Changing Student's Mentor(HELP)

Hi there,

I have an student database system written in php and using mysql. I currently trying to provide a function for the changing the student’s original mentor (during student/mentee registration) to other mentor but I cant get it change.

Here’s the code (not full):


<!-- Mentee Registration (Add Informations) -->
<?php  }else if(isset($_REQUEST['student']) && ($_REQUEST['student']== 'add')) { ?>
<form id="frmaddstu" name="frmaddstu" method="post" action="" >
<table width="818" border="0" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="23" colspan="3"><strong style="font-size: 14px; color: #E0FFFF">Mentee Registration</strong></td>
<tr>
<td height="32" colspan="3"></td>
</tr>
</table>
<table width="550" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22" colspan="3" align="left"><strong style="color: #FFD700; font-size: 13px;">&nbsp;&nbsp;Mentee's Information</strong></td>
</tr>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFF">&nbsp;&nbsp;&nbsp;Matrix No</strong></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<strong id="sprytextfield46">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_id" type="text" id="student_id" value="<?php echo $_REQUEST['student_id']; ?>" size="35" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: 12345</strong></td>
</tr>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFF">&nbsp;&nbsp;&nbsp;Name</strong>
<input name="id" type="hidden" id="id" value="student" />
<input name="student" type="hidden" id="student" value="confirm" /></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<strong id="sprytextfield47">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_name" type="text" id="student_name" value="<?php echo $_REQUEST['student_name'] = (isset($_REQUEST['student_name'])) ? $_REQUEST['student_name'] : ''; ?>" size="35" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Rahmah Binti Abu Bakar</strong></td>
</tr>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFFFFF">&nbsp;&nbsp;&nbsp;Year</strong></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<strong id="spryselect13">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="year" id="year">
<option value="1" <?php if (!(strcmp(1, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>1</option>
<option value="2" <?php if (!(strcmp(2, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>2</option>
<option value="3" <?php if (!(strcmp(3, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>3</option>
<option value="4" <?php if (!(strcmp(4, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>4</option>
<option value="5" <?php if (!(strcmp(5, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>5</option>
<option value="6" <?php if (!(strcmp(5, $_REQUEST['year']))) {echo "selected=\\"selected\\"";} ?>>6</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFFFFF">&nbsp;&nbsp;&nbsp;Programme</strong></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<strong id="spryselect14">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="program" id="program">
<option value="Electronic and Computer Engineering" <?php if (!(strcmp("Electronic and Computer Engineering",isset($_REQUEST['program'])))) {echo "selected=\\"selected\\"";} ?>>Electronic and Computer Engineering</option>
<option value="Electronic and Telecommunication Engineering" <?php if (!(strcmp("Electronic and Telecommunication Engineering", isset($_REQUEST['program'])))) {echo "selected=\\"selected\\"";} ?>>Electronic and Telecommunication Engineering</option>
<option value="Civil Engineering" <?php if (!(strcmp("Civil Engineering", isset($_REQUEST['program'])))) {echo "selected=\\"selected\\"";} ?>>Civil Engineering</option>
<option value="Mechanical Engineering" <?php if (!(strcmp("Mechanical Engineering", isset($_REQUEST['program'])))) {echo "selected=\\"selected\\"";} ?>>Mechanical Engineering</option>
<option value="Chemical Engineering" <?php if (!(strcmp("Chemical Engineering", isset($_REQUEST['program'])))) {echo "selected=\\"selected\\"";} ?>>Chemical Engineering</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFFFFF">&nbsp;&nbsp;&nbsp;Intake Year</strong></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<strong id="spryselect15">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="year_intake" id="year_intake">
<option value="2006 / 2007" <?php if (!(strcmp("2006 / 2007", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2006 / 2007</option>
<option value="2007 / 2008" <?php if (!(strcmp("2007 / 2008", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2007 / 2008</option>
<option value="2008 / 2009" <?php if (!(strcmp("2008 / 2009", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2008 / 2009</option>
<option value="2009 / 2010" <?php if (!(strcmp("2009 / 2010", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2009 / 2010</option>
<option value="2010 / 2011" <?php if (!(strcmp("2010 / 2011", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2010 / 2011</option>
<option value="2011 / 2012" <?php if (!(strcmp("2011 / 2012", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2011 / 2012</option>
<option value="2012 / 2013" <?php if (!(strcmp("2012 / 2013", isset($_REQUEST['year_intake'])))) {echo "selected=\\"selected\\"";} ?>>2012 / 2013</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
  <td height="22" colspan="3" align="left">&nbsp;</td>
</tr>
<tr>
<td height="22" colspan="3" align="left"><strong style="color: #FFD700; font-size: 13px;">&nbsp;&nbsp;Mentor's Information</strong></td>
</tr>
<tr>
<td width="118" height="22" align="left"><strong style="color:#FFFFFF">&nbsp;&nbsp;&nbsp;Mentor's Name</strong></td>
<td width="12" height="22"><strong style="color:#FFFFFF">:</strong></td>
<td width="420" height="22" align="left">
<label for="lect_id"></label>
<strong style="color: #F00; font-size: 10px;">
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_id" id="lect_id">
  <?php do {?>
  <option value="<?php echo $row_addlectstu['lect_id']?>"<?php if (!(strcmp($row_addlectstu['lect_id'], $_REQUEST['lect_id']))) {echo "selected=\\"selected\\"";} ?>><?php echo($row_addlectstu['lect_name'])?></option>
  <?php
} while ($row_addlectstu = mysql_fetch_assoc($addlectstu));
$rows = mysql_num_rows($addlectstu);
if($rows > 0) {
mysql_data_seek($addlectstu, 0);
$row_addlectstu = mysql_fetch_assoc($addlectstu);
}
?>
</select>
*</strong>
</td>
</tr>
<tr>
<td height="6" colspan="3"></td>
</tr>
<tr>
<td height="22"></td>
<td width="12" height="22"></td>
<td width="420" height="22" align="left">
<input type="Image" src="image/button_register1.gif"name="button14" id="button14" value="Submit" />
<strong><a href="manage_dept.php?admin_id=<?php echo $row_admin['admin_id']; ?>&amp;id=student"><img src="image/button_cancel1.gif" border="0" /></a></strong></td>
</tr>
</table>
</form>
<!-- Mentee Registration (Add Informations) -->

<!-- MENTEE'S PROFILE MENU -->
<?php  }else if(isset($_REQUEST['y']) && ($_REQUEST['y']== 'edit')) { ?>
<table width="818" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- Mentee's Profile Title -->
<tr align="center">
<td height="23"><strong style="font-size: 14px; color: #E0FFFF;">Mentee's Profile</strong></td>
</tr>
<tr>
<td height="32" align="right">
<form id="form9" name="form9" method="post" action="">
<input name="id" type="hidden" id="id" value="lect" />
<input name="lect_id" type="hidden" id="lect_id" value="<?php echo $row_advisor['lect_id']; ?>" />
<input name="y" type="hidden" id="y" value="year" />
<input name="year" type="hidden" id="year" value="<?php echo $_REQUEST['year'];?>" />
<input name="admin_id" type="hidden" id="admin_id" value="<?php echo $row_admin['admin_id']; ?>" />
<label>
<input name="button20" type="image" id="button20" value="Submit" src="image/button_back1.gif" align="top" />
</label>
</form>
</td>
</tr>
</table>
<!-- Mentee's Profile Title -->
<!-- Mentee's Profile Table -->
<form action="<?php echo $editFormAction; ?>" id="frmedituser" name="frmedituser" method="post">
<table width="818" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- Personal Information -->
<tr>
  <td height="22" colspan="3"><strong style="color: #FFD700; font-size: 13px;">&nbsp;Personal Information</strong></td>
</tr>
<tr>
  <td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Name</strong></td>
  <td width="12" height="21"><strong style="color: #FFFFFF;">:</strong></td>
  <td width="640" height="21">
  <strong id="sprytextfield1">
  <label>
  <input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_name" type="text" id="student_name" value="<?php echo $row_editstudent['student_name']; ?>" size="40" maxlength="100" />
  </label>
  </strong>
  <strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Sarimah Binti Abdul Rahim</strong>
  </td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;IC No</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield2">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_ic" type="text" id="student_ic" value="<?php echo $row_editstudent['student_ic']; ?>" size="40" maxlength="12" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: 891112035317</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Gender</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="spryselect1">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_gender" id="student_gender">
<option value="Male" <?php if (!(strcmp("Male", $row_editstudent['student_gender']))) {echo "selected=\\"selected\\"";} ?>>Male</option>
<option value="Female" <?php if (!(strcmp("Female", $row_editstudent['student_gender']))) {echo "selected=\\"selected\\"";} ?>>Female</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Race</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield3">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_race" type="text" id="student_race" value="<?php echo $row_editstudent['student_race']; ?>" size="40" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Malay</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Religion</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield4">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_religion" type="text" id="student_religion" value="<?php echo $row_editstudent['student_religion']; ?>" size="40" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Islam</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Present Address</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield5">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_address" type="text" id="student_address" value="<?php echo $row_editstudent['student_address']; ?>" size="100" maxlength="180" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Corresponding Address</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield6">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_address_c" type="text" id="student_address_c" value="<?php echo $row_editstudent['student_address_c']; ?>" size="100" maxlength="180" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Contact No</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield7">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_contact" type="text" id="student_contact" value="<?php echo $row_editstudent['student_contact']; ?>" size="40" maxlength="10" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: 0123456789</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Email Address</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield8">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="student_email" type="text" id="student_email" value="<?php echo $row_editstudent['student_email']; ?>" size="40" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: arsarimah89@gmail.com</strong>
</td>
</tr>
<tr>
<td height="21" colspan="3"></td>
</tr>
<!-- Personal Information -->
<!-- Academic Information -->
<tr>
<td height="22" colspan="3"><strong style="color: #FFD700; font-size: 13px;">&nbsp;Academic Information</strong></td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Matrix No</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21"><strong style="font-size: 11px; color:#FFFFFF"><?php echo $row_editstudent['student_id']; ?></strong></td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Year</strong></td>
<td width="12" height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="spryselect2">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="year" id="year">
<option value="1" <?php if (!(strcmp(1, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>1</option>
<option value="2" <?php if (!(strcmp(2, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>2</option>
<option value="3" <?php if (!(strcmp(3, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>3</option>
<option value="4" <?php if (!(strcmp(4, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>4</option>
<option value="5" <?php if (!(strcmp(5, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>5</option>
<option value="6" <?php if (!(strcmp(6, $row_editstudent['year']))) {echo "selected=\\"selected\\"";} ?>>6</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Programme</strong></td>
<td width="12" height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="spryselect3">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="program" id="program">
<option value="Electronic and Computer Engineering" <?php if (!(strcmp("Electronic and Computer Engineering", $row_editstudent['program']))) {echo "selected=\\"selected\\"";} ?>>Electronic and Computer Engineering</option>
<option value="Electronic and Telecommunication Engineering" <?php if (!(strcmp("Electronic and Telecommunication Engineering", $row_editstudent['program']))) {echo "selected=\\"selected\\"";} ?>>Electronic and Telecommunication Engineering</option>
<option value="Civil Engineering" <?php if (!(strcmp("Civil Engineering", $row_editstudent['program']))) {echo "selected=\\"selected\\"";} ?>>Civil Engineering</option>
<option value="Mechanical Engineering" <?php if (!(strcmp("Mechanical Engineering", $row_editstudent['program']))) {echo "selected=\\"selected\\"";} ?>>Mechanical Engineering</option>
<option value="Chemical Engineering" <?php if (!(strcmp("Chemical Engineering", $row_editstudent['program']))) {echo "selected=\\"selected\\"";} ?>>Chemical Engineering</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Intake Session</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="spryselect4">
<label>
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="year_intake" id="year_intake">
<option value="2006 / 2007" <?php if (!(strcmp("2006 / 2007", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2006 / 2007</option>
<option value="2007 / 2008" <?php if (!(strcmp("2007 / 2008", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2007 / 2008</option>
<option value="2008 / 2009" <?php if (!(strcmp("2008 / 2009", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2008 / 2009</option>
<option value="2009 / 2010" <?php if (!(strcmp("2009 / 2010", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2009 / 2010</option>
<option value="2010 / 2011" <?php if (!(strcmp("2010 / 2011", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2010 / 2011</option>
<option value="2011 / 2012" <?php if (!(strcmp("2011 / 2012", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2011 / 2012</option>
<option value="2012 / 2013" <?php if (!(strcmp("2012 / 2013", $row_editstudent['year_intake']))) {echo "selected=\\"selected\\"";} ?>>2012 / 2013</option>
</select>
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td height="21" colspan="3"></td>
</tr>
<!-- Academic Information -->
<!-- Mentor Information -->
<tr>
  <td height="22" colspan="3"><strong style="color: #FFD700; font-size: 13px;">&nbsp;Mentor Information</strong></td>
</tr>
<tr>
  <td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Mentor's Name</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="420" height="22" align="left">
<label for="lect_id"></label>
<strong style="color: #F00; font-size: 10px;">
<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_id" id="lect_id">
  <?php do {?>
  <option value="<?php echo $row_addlectstu['lect_id']?>"<?php if (!(strcmp($row_addlectstu['lect_id'], $row_editstudent['lect_id']))) {echo "selected=\\"selected\\"";} ?>><?php echo($row_addlectstu['lect_name'])?></option>
  <?php
} while ($row_addlectstu = mysql_fetch_assoc($addlectstu));
$rows = mysql_num_rows($addlectstu);
if($rows > 0) {
mysql_data_seek($addlectstu, 0);
$row_addlectstu = mysql_fetch_assoc($addlectstu);
}
?>
</select>
*</strong>
</td>
</tr>
<!-- Mentor Information -->
<!-- Medical Information -->
<tr>
  <td height="22" colspan="3">&nbsp;</td>
</tr>
<tr>
<td height="22" colspan="3"><strong style="color: #FFD700; font-size: 13px;">&nbsp;Medical Information</strong></td>
</tr>
<tr bgcolor="#D6F5F5">
<td height="21" colspan="3"><strong style="color: #FFFFFF;">&nbsp;&nbsp;( Please include information about health related issued which requires special attention - allergies, diseases etc ):</strong></td>
</tr>
<tr>
<td height="21" colspan="3">
<strong id="sprytextfield9">
<label>&nbsp;&nbsp;
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="medical" type="text" id="medical" value="<?php echo $row_editstudent['medical']; ?>" size="128" maxlength="180" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td height="21" colspan="3"></td>
</tr>
<!-- Medical Information -->
<!-- Emergency Information -->
<tr>
<td height="22" colspan="3"><strong style="color: #FFD700; font-size: 13px;">&nbsp;In case of emergency, please contact</strong></td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Name</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield10">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="medical_name" type="text" id="medical_name" value="<?php echo $row_editstudent['medical_name']; ?>" size="35" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Abdul Rahim Bin Hussein</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Relation to Student</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield11">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="medical_relation" type="text" id="medical_relation" value="<?php echo $row_editstudent['medical_relation']; ?>" size="35" maxlength="100" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: Father</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Contact No</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield12">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="medical_contact" type="text" id="medical_contact" value="<?php echo $row_editstudent['medical_contact']; ?>" size="35" maxlength="10" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong><strong class="style27 style25" style="color: #999; font-size: 10px"> eg: 0198765432</strong>
</td>
</tr>
<tr>
<td width="166" height="21"><strong style="color: #FFFFFF;">&nbsp;&nbsp;Corresponding Address</strong></td>
<td height="21"><strong style="color: #FFFFFF;">:</strong></td>
<td width="640" height="21">
<strong id="sprytextfield13">
<label>
<input style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="medical_address" type="text" id="medical_address" value="<?php echo $row_editstudent['medical_address']; ?>" size="100" maxlength="180" />
</label>
</strong>
<strong style="color: #F00; font-size: 10px;">*</strong>
</td>
</tr>
<tr>
<td width="166" height="21"></td>
<td width="12" height="21"></td>
<td width="640" height="21">
<input name="lect_id" type="hidden" id="lect_id" value="<?php echo $row_advisor['lect_id']; ?>" />
<input name="student_id" type="hidden" id="student_id" value="<?php echo $row_editstudent['student_id']; ?>" />
<input name="y" type="hidden" id="y" value="suss" />
<strong style="text-transform:capitalize">
<?php
date_default_timezone_set ("Asia/Kuching");
$upost=date("D d/m/y : H:i:s", time());
?>
<input name="admin_update" type="hidden" id="admin_update" value="<?php echo $upost;?>" />
<input name="admin_id" type="hidden" id="admin_id" value="<?php echo $row_admin['admin_id']; ?>" />
</strong></td>
</tr>
<tr>
<td height="6" colspan="3"></td>
</tr>
<tr>
<td width="166" height="21"></td>
<td width="12" height="21"></td>
<td width="640" height="21">
<label>
<input type="image" src="image/button_update1.gif" name="button5" id="button5" value="Save" />
</label>
</td>
</tr>
<!-- Emergency Information -->
</table>
<input type="hidden" name="MM_update" value="frmedituser" />
</form>
<!-- Mentee's Profile Table -->
<!-- MENTEE'S PROFILE MENU -->

<!-- MENTEE LIST MENU -->
<?php  }else{?>
<!-- Mentee List Title -->

This is the lines of insert the 1st mentor(during registration):


<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_id" id="lect_id">
  <?php do {?>
  <option value="<?php echo $row_addlectstu['lect_id']?>"<?php if (!(strcmp($row_addlectstu['lect_id'], $_REQUEST['lect_id']))) {echo "selected=\\"selected\\"";} ?>><?php echo($row_addlectstu['lect_name'])?></option>
  <?php
} while ($row_addlectstu = mysql_fetch_assoc($addlectstu));
$rows = mysql_num_rows($addlectstu);
if($rows > 0) {
mysql_data_seek($addlectstu, 0);
$row_addlectstu = mysql_fetch_assoc($addlectstu);
}
?>
</select>

This is the lines where I am trying to change the 1st mentor to the other(during update):


<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_id" id="lect_id">
  <?php do {?>
  <option value="<?php echo $row_addlectstu['lect_id']?>"<?php if (!(strcmp($row_addlectstu['lect_id'], $row_editstudent['lect_id']))) {echo "selected=\\"selected\\"";} ?>><?php echo($row_addlectstu['lect_name'])?></option>
  <?php
} while ($row_addlectstu = mysql_fetch_assoc($addlectstu));
$rows = mysql_num_rows($addlectstu);
if($rows > 0) {
mysql_data_seek($addlectstu, 0);
$row_addlectstu = mysql_fetch_assoc($addlectstu);
}
?>
</select>

Please comment where should I correct. Thanks in advance.