Jump to content

Recommended Posts

I have two php scripts on my site. Arcadem and bbPHP.

 

What I'm trying to do is combine the logins for both scripts. I want to use bbPHP for the main interface.

 

I really don't know where to start. What I'm looking to do is use the bbPHP register and login form for both scripts.

 

I'v been looking into "hooks", eg. username => memberid.

 

But I don't really understand how it works. From what I understand "username" would be considered to be "memberid". But how do I call both databases, and get the form to point add to both databases.

 

I just need someone to give me general info to point me in the right direction.

 

1. How to call two database at the same time?

2. How to use one form to write to two databases?

3. How to login to two scripts with one form?

Link to comment
https://forums.phpfreaks.com/topic/207262-help-with-combining-multiple-logins/
Share on other sites

1. How to call two database at the same time?

 

Pass the value TRUE for $new_link

 

$db1 = mysql_connect(host, username, password, TRUE);

$db2 = mysql_connect(host, username, password, TRUE);

 

Or if you literally mean two databases, either:

 

mysql_select_db('...');

//do stuff

 

mysql_select_db('...');

// do stuff

 

Or

 

mysql_query('SELECT .. FROM database.table WHERE ..');

mysql_query('SELECT .. FROM database2.table2 WHERE ..');

 

2. How to use one form to write to two databases?

 

Same as above

 

3. How to login to two scripts with one form?

 

Point to one script that will call both login procedures, you can however still only use one session so on each successful login you will have one obsolete session identifier (possible threat for session hijacking?)

What I have done in the past, is i'd install the forum software..  review the tables needed for logging in and registering and such....

 

Then on the main site, I would use that exact same database for the site tables.  Which would allow only 1 database used for the site and forums, but I would have to custom program the login / register scripts for the front end of the site (outside of the forums site)....

What I have done in the past, is i'd install the forum software..  review the tables needed for logging in and registering and such....

 

Then on the main site, I would use that exact same database for the site tables.  Which would allow only 1 database used for the site and forums, but I would have to custom program the login / register scripts for the front end of the site (outside of the forums site)....

 

That's what I was thinking of doing. I'm actually trying to link the forum to an arcade script. It'll be a chore though. I'll have to tweak all of the arcade script so all the tables are the same. Like the forum is prefix_password and the arcade is prefix_userpass.

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.