Hi there, I having problem with my dynamic webpages designed with PHP and MySQL. There is a undefined index notice of 'student_name'. The notice is from the highlighted line below.
My codes:
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "frmedituser")) {
$updateSQL = sprintf("UPDATE student SET student_name=%s, student_ic=%s, student_gender=%s, student_race=%s, student_religion=%s, student_address_c=%s, student_email=%s, `year`=%s, year_intake=%s, program=%s, student_contact=%s, student_address=%s, lect_id=%s, medical=%s, medical_name=%s, medical_relation=%s, medical_contact=%s, medical_address=%s, admin_id=%s, admin_update=%s WHERE student_id=%s",
GetSQLValueString($_POST['student_name'], "text"),
GetSQLValueString($_POST['student_ic'], "text"),
GetSQLValueString($_POST['student_gender'], "text"),
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "frmstuconfirm")) {
$insertSQL = sprintf("INSERT INTO student (student_id, student_pass, student_update, student_name, `year`, year_intake, program, lect_id, admin_id, admin_update) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['student_id'], "int"),
GetSQLValueString($_POST['student_pass'], "text"),
GetSQLValueString($_POST['student_update'], "text"),
GetSQLValueString($_POST['student_name'], "text"),
<tr bgcolor="#FFFFCC">
<td width="118" height="22"><strong> 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>:</strong></td>
<td width="420" height="22">
<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="[B][COLOR="Red"]<?php echo $_REQUEST['student_name']; ?>[/COLOR][/B]" 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 bgcolor="#FFFFCC">
<td width="118" height="22"><strong> Name</strong></td>
<td width="12" height="22"><strong>:</strong></td>
<td width="420" height="22"><?php echo $student_name=$_REQUEST['student_name'];?></td>
</tr>
<tr bgcolor="#D6F5F5">
<td width="118" height="22"><strong> Year</strong></td>
<td width="12" height="22"><strong>:</strong></td>
<td width="420" height="22"><?php echo $year=$_REQUEST['year'];?></td>
</tr>