Error handling for user-profile and vendor-settings
This commit is contained in:
parent
d27f546bba
commit
d24c4f98d2
|
@ -19,7 +19,7 @@
|
|||
if ($result > 0) {
|
||||
$_SESSION["isVendor"] = true;
|
||||
}
|
||||
header("location: index.php");
|
||||
header("location: $url");
|
||||
} else {
|
||||
// $_SESSION["loginError"] = "Invalid email or password. Please try again.";
|
||||
header("location: login.php?error=1");
|
||||
|
|
|
@ -11,6 +11,12 @@ if ($_SESSION["userId"] <> "") {
|
|||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
if ($_SESSION["isVendor"] == true) {
|
||||
header("location: vendor-settings.php");
|
||||
}
|
||||
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
|
@ -21,6 +21,12 @@ if ($_SESSION["userId"] <> "") {
|
|||
$_SESSION["isLoggedIn"] = false;
|
||||
header("location: login.php");
|
||||
}
|
||||
|
||||
if ($_SESSION["isCustomer"] == true) {
|
||||
header("location: user-profile.php");
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
|
Loading…
Reference in New Issue