login betwen 2 websites

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
sublimenal
Forum Newbie
Posts: 23
Joined: Sun May 16, 2004 2:17 pm
Location: Massachusetts

login betwen 2 websites

Post 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
sublimenal
Forum Newbie
Posts: 23
Joined: Sun May 16, 2004 2:17 pm
Location: Massachusetts

Re: login betwen 2 websites

Post by sublimenal »

Delete please, figured it out
User avatar
JNettles
Forum Contributor
Posts: 228
Joined: Mon Oct 05, 2009 4:09 pm

Re: login betwen 2 websites

Post 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.
sublimenal
Forum Newbie
Posts: 23
Joined: Sun May 16, 2004 2:17 pm
Location: Massachusetts

Re: login betwen 2 websites

Post 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.
michejohnson
Forum Newbie
Posts: 4
Joined: Wed Dec 30, 2009 2:46 am

Re: login betwen 2 websites

Post 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.
Post Reply