Jump to content

Two Databases, One Login


LBJerryH

Recommended Posts

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.
Link to comment
Share on other sites

[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.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.