function validate_user($un, $pwd) { $mysql = new verify(); $ensure_credentials = $mysql->verify_Username_and_Pass($un, $pwd); if ($ensure_credentials && $_SESSION['payment']) { $_SESSION['status'] = 'authorized'; header("location: banklink/Banklink.php"); } elseif ($ensure_credentials) { $_SESSION['status'] = 'authorized'; header("location: index.php"); } else { return "Please enter correct username and password!"; } }