0) { if ($_SESSION['msg'] != "Invalid input") {//don't display an error message if the input is empty print(''); $_SESSION['msg'] = ""; } } print ''; print ''; print ''; print '
' . $_SESSION['msg'] . '
Edit Student Profile
'; print ''; if ($_GET['func'] == 'studentlist') { $data = $_SESSION['teacherstudentsdata']; $data_len = count($data); if ($data_len > 0) { print ''; print ''; print ''; for ($i = 0; $i < $data_len; $i++) { print ''; print ''; print ''; } } else { print ''; print ''; print ''; } } else if ($_GET['func'] == 'editstudent') { $data = $_SESSION['profiledata']; if ($data == null) { print ''; return; } print ''; print ''; print ''; print '
'; print 'Please note that the fields with "*" are mandatory.'; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; } print '
Below are all students found in the database:
' . $data[$i]['lastfirstname'] . '
No students found in the database.
Cannot get student profile
*Username:
*Password:
*Given Name:
*Surname: '; print '
*Email:
*Gender: '; print '
*Date of Birth: -- (DD-MM-YYYY)'; print '
*Address:
*City:
*Province:
*Country:
*Postal Code:
*Phone: () '; print '-'; print ''; print '
Available Course(s): '; $data = $_SESSION['coursesdata']; $scheduledata = $_SESSION['scheduledata']; for ($i=0; $i < count($data); $i++) { //check if the current course is already selected by this student $found = false; for ($j=0; $j < count($scheduledata); $j++) { if (strpos($data[$i]['cnamedesc'], $scheduledata[$j][0]) !== false) { $found = true; break; } } //display the course as checked or unchecked if ($found == true) { print '' . $data[$i]['cnamedesc'] . '
'; } else { print '' . $data[$i]['cnamedesc'] . '
'; } } print '

'; print '
'; ?>