Jump to content

Login System?


cpugeek
 Share

Recommended Posts

Does anyone know how to make a login script using mysql that will log into 2 php systems at once?Eg. Gallery & SMForum.Is there one out there or am I going to have to right my own?do i need it to make two cookies. [one for the gallery & one for the forum.] or what?& can i just set the cookie names the same for both systems? & hope they are created the same way? or what?Sorry, I just really want to know so I can get my site up & running & this is #1 out of 2 problems keeping me from launching it.Thanks, in Advance...

Link to comment
Share on other sites

Many things will determine how this can be made possible. First off, understand that it is possible, its just a matter what how you want it to work and what level of seemlessness you want to pursue.Is your example simple meant to demonstrate that you are imagining those two sites to be able to use the same username and password and then therefor log the user in at the same time?In any respect, you need to figure out of the two sites you want to "connect" are on the same servers or totally different ones. Then, figure out if you have database permissions controls - if so then you simply make one the parent or at least synchronize the two when an account is created or update on one or the other. If you do not have access to connect to the database remotely, then still need to pick a parent and then create an isolated login page there. Then ALL requests for protected content need to be redirected automatically there (remembering the referring url). Then that should forward back to the original destination. When it goes back to the original destination it will have to contain a token that is used to get the login credentials needed by the site to let them in. This would be done locally or though a web service call back to the parent site (my preferred method).That is most seemless route. Of course, you could just put gateway links sprinkled throughout the site that are coded to go to specific pages on the other site. Those pages would know how to log the person in, but would never get them to a specific file unless it was coded to remember that as well.Any way you look at it, its not a small task. And that doesn't even touch on the issue Internet Explorer (and only IE) has with browser session identification....

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...