Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while ($stmt->fetch()) {
- if ($teacherusername == $dbTeacherUsername && $teacherpassword == $dbTeacherPassword) {
- if ($dbActive == 1) {
- $loggedIn = true;
- } else if ($dbActive == 0) {
- $loggedIn = false;
- echo "You Must Activate Your Account from Email to Login";
- }
- }
- }
- if ($loggedIn == false && $_POST) {
- echo "The Username or Password that you Entered is not Valid. Try Entering it Again";
- }
- while($stmt->fetch()) {
- if ($teacherusername == $dbTeacherUsername && $teacherpassword == $dbTeacherPassword) {
- if ($dbActive == 1){
- $loggedIn = true;
- } else if ($dbActive == 0) {
- $loggedIn = false;
- /****************************
- *
- * at this point, $loggedIn == false.
- *
- ****************************/
- echo "You Must Activate Your Account from Email to Login";
- }
- }
- }
- /****************************
- *
- * at this point, $loggedIn == false.
- *
- * since $loggedIn == false and $_POST is truthy, your if statement will get entered.
- *
- ****************************/
- if ($loggedIn == false && $_POST) {
- echo "The Username or Password that you Entered is not Valid. Try Entering it Again";
- }
- $active = true;
- .
- .
- .
- if ($dbActive == 0) {
- $loggedIn = false;
- $active = false;
- echo "You Must Activate Your Account from Email to Login";
- }
- .
- .
- .
- if (!$loggedIn && $active && isset($_POST['formInputName']) {
- echo "The Username or Password that you Entered is not Valid. Try Entering it Again";
- }
- while($stmt->fetch()) {
- if ($stmt->fetch()) {
- if ($row->$dbActive) {
- # valid login
- } else {
- # needs activation
- }
- } else {
- # invalid login
- }
- if ($dbActive == 1){
- $loggedIn = true;
- } else if ($dbActive == 0) {
- $loggedIn = false;
- echo "You Must Activate Your Account from Email to Login";
- }
- if ($dbActive == 1){
- $loggedIn = true;
- } else{
- $loggedIn = false;
- echo "You Must Activate Your Account from Email to Login";
- }
- if ($loggedIn == false && isset($_POST['somefield']) {
- echo "The Username or Passwor...";
- }
- if ($loggedIn == false && !empty($_POST) && $dbActive != 0) {
- echo "The Username or Password that you Entered is not Valid. Try Entering it Again";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement