Page 1 of 1

Name NOT displayed after selected from drop down list

Posted: Fri Nov 11, 2011 5:06 pm
by Php Beginner
Hi there, I am doing the mentoring system I am having problem when I try to register a mentee into the system. The name of the "Mentor" I have chose from the 'register page' which in the drop down list form cannot be displayed. Once I click the register button, all the contents I have entered in the 'Register Page' appear in the 'Register Confirmation Page' except the mentor's name.

Here the codes for the mentor's name drop down list in the "Register Page":

Code: Select all

<select style="color: #009; font-family: Verdana, Geneva, sans-serif; font-size: 11px;" name="lect_id2" id="lect_id2">
  <?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>
Code that display the mentor's name in "Register Confirmation page":

Code: Select all

<?php echo $lecturer_id=$_REQUEST['lect_id'];
$zzz = mysql_query("SELECT * FROM lecturer WHERE lect_id='$lecturer_id'");
if($zzz = mysql_fetch_assoc($zzz)){
echo $xxx=$zzz['lect_name'];}
?>
The codes do not prompt me any notices of index error or warning when i try to run my registering pages locally, the only problem is the mentor's name not showing up in the "Register Confirmation Page".