san_v Posted January 4, 2012 Share Posted January 4, 2012 Dear all, Please help me. I have two sites and both run on separate DB, both have separate signup and login process, Now i want if any user login from any site can access both sites. There are separate session for both sites now i want to use any of the session for user authentication. Please give suggestions. Thanks, Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/ Share on other sites More sharing options...
Muddy_Funster Posted January 4, 2012 Share Posted January 4, 2012 could you explain more clearly what you are looking for? Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304133 Share on other sites More sharing options...
ManiacDan Posted January 4, 2012 Share Posted January 4, 2012 You can't use the same session for two different sites, but you can certainly use the same database. Whatever functionality you use to log someone in, change that to a new, shared database. Move your authentication information to that shared db. Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304144 Share on other sites More sharing options...
Vel Posted January 4, 2012 Share Posted January 4, 2012 The only possible thing you could do is to include a cookie that is created on login on either site that is recognised by both sites. You would have to check to see if a cookie created by that site or created by the other site exists. Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304187 Share on other sites More sharing options...
ManiacDan Posted January 4, 2012 Share Posted January 4, 2012 Many browsers won't respect a cookie being set for the wrong site. Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304238 Share on other sites More sharing options...
Vel Posted January 4, 2012 Share Posted January 4, 2012 Many browsers won't respect a cookie being set for the wrong site. I thought you could search for cookies if you knew the specific domain and name? Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304240 Share on other sites More sharing options...
ManiacDan Posted January 4, 2012 Share Posted January 4, 2012 You think I could write a site that would ready your phpfreaks or facebook cookies? No. Cookies are hard locked to the domain they came from. Quote Link to comment https://forums.phpfreaks.com/topic/254338-user-login-validation-from-two-databse-in-my-website/#findComment-1304245 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.