I am trying to redirect registered users who's email address contains a certain string.
example email 1 -> 12345@email.com
example email 2 -> 12345.abc@email.com
I want to separate emails containing .abc@email.com
and send them to a separate page using a header redirect. This is intended in signing in a user with an email containing .abc@
to an administration page.
Currently all users are being redirected to the same page regardless of the email address.
Example snippet code below. This is my first time asking a question, I hope I have supplied enough information.
$_SESSION["user_id"] = $row[0];
$_SESSION["fname"] = $row[1];
if ($email==".abc@email.com")
{
header('Location:home.php');
}
else
header ('Location:home2.php');
}