Sorry, your new password must be 3 or more letters or numbers. Please go back and try again."; exit(); } if ($oldpass == $newpass1) { print "

Sorry, your new password is the same as your current password. Please go back and try again.

"; exit(); } if (trim($answer) == '') { print "

Sorry, you must answer your secure question.

"; exit(); } $query = "SELECT FirstName from SR_instructor WHERE InstructorID = '$ID' AND Password = OLD_PASSWORD('$oldpass')"; $result = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error()); // if row exists -> user/pass combination is correct if (mysql_num_rows($result) == 1) { //check new password if ($newpass1 != $newpass2) { print "

Sorry, your new password is not confirmed. Please go back and try again.

"; exit(); } //update password $query = "update SR_instructor set Password = OLD_PASSWORD('$newpass1'), Status='1', Question='$question', Answer='$answer' where InstructorID = '$ID'"; mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error()); if (mysql_affected_rows() != 1) { print "

Error: duplicate user. Please contact LLC webmaster. Thank you.

"; exit(); } } // user/pass combination is wrong else { print "

Sorry, your current password is not correct. Please go back and try again.

"; exit(); } print << Change Passwod
Sign Out

Your password has been changed.

END; if ($FirstTime=='1') { $query = "SELECT FirstName, LastName, Email, Extension, Home, Cell, Prime, Memo from SR_instructor WHERE InstructorID = '$ID'"; $result = mysql_query($query, $connection) or die ("Error in query: $query. " . mysql_error()); $row = mysql_fetch_row($result); list ($startyear, $startmonth, $startday) = split ('-', $row[2]); list ($endyear, $endmonth, $endday) = split ('-', $row[3]); print <<
Update Personal Information

END; print <<
First Name:
Last Name:
Extension:
E-mail: **Please note only mtsac.edu emails accepted.
Home Phone:
Cell Phone:
My Preference
I would like to be contacted by
END; } else { print <<reservation page. Back to My Account END; } print << END; ?>