I am a newbie in PHP, I know how to set a session variable in my own website. I am trying to do this task where I need to set a session variable on another website that redirects to the login page on my website. Is it possible? If the question is still ambiguous, here is a better explanation.
My website is on server A Another website is on server B A page on server B redirects the user to a page on server A. This page checks if the login details are correct. If they are, the page on server A sets a session variable. However, when it redirects to server B after setting the session variable. The page on server B directs it back to server A notwithstanding the session set.
Here is the code if you need to see it
if(!isset($_SESSION["user"]))
{
header("Location: http://serverA.com/login.php?w=serverB.com");
}
elseif (isset($_SESSION["user"]))
{
//do something
}