LBJerryH Posted August 17, 2006 Share Posted August 17, 2006 I need some help on this. I need to have it where when someone logs into my main site, one database, that login passes to the second database. One login for two databases. Can this be done??? The way the site is set up is the main site is www.fuelmyfaith.com and the secondary site is set up like this: www.fuelmyfaith.com/pligg. They are on 2 seperate databases running their own PHP scripts andI want one login for both. Thanks. Quote Link to comment Share on other sites More sharing options...
wardo Posted August 18, 2006 Share Posted August 18, 2006 You could store the log in table on either database and when you have checked for a successful log in in your script you could just include a different connection to the database as required. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 18, 2006 Share Posted August 18, 2006 The login to the site and the login to the DB are separate... I'm confused. Quote Link to comment Share on other sites More sharing options...
LBJerryH Posted August 18, 2006 Author Share Posted August 18, 2006 [quote author=wardo link=topic=104681.msg417977#msg417977 date=1155909358]You could store the log in table on either database and when you have checked for a successful log in in your script you could just include a different connection to the database as required. [/quote]Ok, that makes since. Now how would I go about doing this? My database skills are lacking. If you could help me with this, I would really appreciate it. Quote Link to comment Share on other sites More sharing options...
wardo Posted August 21, 2006 Share Posted August 21, 2006 A better way to do it would be:You would have a table in one of your databases called users for example which stores the username and password. Your log in page would check this database for the username and password that the user enters. If it does not match then a message is displayed telling them so. If the log in is successful a cookie could be set and you could check on either site if the cookie is present to control access. You would only need one log in page which sets a cookie and you could then check for that cookie on either site. Hope this makes sense. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 21, 2006 Share Posted August 21, 2006 Yup, that's the general idea... one set of login credentials to the outside world, and as many as you want/need on the inside. Quote Link to comment 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.