Page 1 of 1

login betwen 2 websites

Posted: Fri Jan 08, 2010 9:44 am
by sublimenal
Hi there, I would like to achieve the following and I'm wondering what you think the best way to do this.


1. We have a project manager program that has a bunch of users and projects on domain A using php and mssql
2. We have a CMS system on domain B using php and mysql
3. Both websites are on the same server, both are using seperate database of course (one mysql and one mssql)

I want to login from site B to site A and stay logged in on both sites so the user does not have multiple logging in. Once logged in i want to collect data from site A and display it on site B (latest projects etc..)

Is there a way to send a session to both sites? who would you do this? In a perfect world both sites would be on the same db but not here 8O


Thanks

Re: login betwen 2 websites

Posted: Fri Jan 08, 2010 12:25 pm
by sublimenal
Delete please, figured it out

Re: login betwen 2 websites

Posted: Fri Jan 08, 2010 12:28 pm
by JNettles
Rather than delete - if you dont mind please explain how you solved the problem. Building up the repositories of knowledge and all that...... but I assume you figured out a way to share session data between the two.

Re: login betwen 2 websites

Posted: Fri Jan 08, 2010 12:33 pm
by sublimenal
Well actually it was easier then I thoguht. I installed a mssql database class so now on site b i have a mssql db loaded and a mysql loaded. I posted to my script on site B searched for the user and saved the cookie, if nothing failed. I sent the same exact info to a script located on the other domain and did the same exact search then redirected back to site B. It's seamless to the user fast and secure. So in the end there are 2 sessions with the same exact data.

Re: login betwen 2 websites

Posted: Sat Jan 09, 2010 12:45 am
by michejohnson
Hi Sublimenal,
I like to say thanks to you for sharing such a useful information with us.
I want to do same thing but I failed in that. I saw your post and tried
again and I have created successfully. Thanks again.