/home/techb158/workloadmatch.com/Teacher/Inc
NameSizeModeActions
Update_Course_Preference.php130490644editdlrm
Update_Course_Preference_Secretarial.php54740644editdlrm
Update_Profile.php47320644editdlrm
Edit: /home/techb158/workloadmatch.com/Teacher/Inc/Update_Profile.php (4732B)
The email address you entered is not valid

'; } //$error_msg .= $FUserNames .' '. $Admin_ID .' '. $LUserNames; // $error_msg .= $FUserNames .' '. $random_salt .' '. $LUserNames .' '. $Address .' '. $Phones .' '. $CollegeNames .' '. $Admin_ID .' '. $email .' '. $password ; $user_n=$_SESSION['user_id']; $stmt = $mysqli->prepare('SELECT * FROM teacher_profile WHERE Teacher_ID = ?'); $stmt->bind_param('s', $user_n); $stmt->execute(); $result = $stmt->get_result(); //$row = $result->fetch_assoc(); $count =$result->num_rows; if($count > 0) { if (empty($error_msg)) { $stmt = $mysqli->prepare("UPDATE teacher_profile SET First_Name=?, Last_name=?, Email=?, Phone=?, Time_Slot=?, prof_lang=?, Note=?, SMS_Carrier=? WHERE User_Name=? AND Teacher_ID=?"); $stmt->bind_param('ssssssssss', $FUserNames, $LUserNames, $email, $Phones, $time_slot_combined, $prof_lang, $Note, $Access_Carrier, $Admin_ID, $user_n); if (!$stmt->execute()) { $stmt->close(); set_flash_msg($stmt->error, 'warning'); header('Location: profile.php'); // header('Location: profile.php?error=Client failure to update!'); exit(); }else{ $stmt->close(); set_flash_msg('User is Updated successfully. Thanks!', 'success'); header('Location: profile.php'); exit(); } } } }else { set_flash_msg('all information are required!', 'warning'); header('Location: profile.php'); exit(); } }else if(isset($_POST["submits"]) && $_POST["submits"]!="") { if (isset ($_POST['p'])) { $password = filter_input(INPUT_POST, 'p', FILTER_UNSAFE_RAW); if (strlen($password) != 128) { $error_msg .= '

Invalid password configuration.

'; } $password = password_hash($password, PASSWORD_BCRYPT); //$error_msg .= $FUserNames .' '. $Admin_ID .' '. $LUserNames; // $error_msg .= $FUserNames .' '. $random_salt .' '. $LUserNames .' '. $Address .' '. $Phones .' '. $CollegeNames .' '. $Admin_ID .' '. $email .' '. $password ; $user_n=$_SESSION['user_id']; $stmt = $mysqli->prepare('SELECT * FROM teacher_profile WHERE Teacher_ID = ?'); $stmt->bind_param('s', $user_n); $stmt->execute(); $result = $stmt->get_result(); $row = $result->fetch_assoc(); $count =$result->num_rows; if($count > 0) { if (empty($error_msg)) { $stmt2 = $mysqli->prepare("UPDATE teacher_profile SET Password=? WHERE User_Name=? AND Teacher_ID=?"); $stmt2->bind_param('sss', $password, $row['User_Name'], $user_n); if (!$stmt2->execute()) { $stmt2->close(); // header('Location: profile.php?error='.$stmt2->error); set_flash_msg('Client password failure to update!', 'warning'); header('Location: profile.php'); exit(); } $stmt2->close(); } set_flash_msg('User password is updated successfully. Thanks!', 'success'); header('Location: profile.php'); exit(); } }else { set_flash_msg('all information are required!', 'warning'); header('Location: profile.php'); exit(); } }