In a webpage (A.com) i have a login page with "Remember me" option. When a user clicks or writes the url to see that login page, I'm checking cookies on that page and sets $_Session[value]=$_Cookie[value] and redirects them to member area. Till here there is no problem.

On the other hand in another domain there is a link to that login url. Here problem starts. When I click the button in the bottom of B.com, Chrome ignores the cookies and loops member.php between login.php.

FF has no problems.

How can i solve that problem? Any help, thanks in advance...

Thats my code:

if (isset($_COOKIE['rememberme']) && $_COOKIE['rememberme']=="rememberme")
   {
    $_SESSION['userId']=$_COOKIE['userId'];
   }

   if(isset($_SESSION['userId']))
   {
    header('Location:memberArea.php');
    die();
   }
   else
   // html login form...
link|improve this question
Do you mean serverA has the login, sets the cookie and goes to member area on serverA with not problem, but serverB has a login, sets the cookie, then redirects to serverA's member area and fails? – digit1001 May 17 at 7:59
feedback

migrated from serverfault.com Nov 3 '11 at 19:16

This question came from our site for system administrators and desktop support professionals.

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown