gilgimech Posted July 9, 2010 Share Posted July 9, 2010 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? Quote Link to comment Share on other sites More sharing options...
sixserve Posted July 11, 2010 Share Posted July 11, 2010 Your best bet is to choose one form, and set the other cookie appropriately, or have it post the other form automatically. Quote Link to comment Share on other sites More sharing options...
ignace Posted July 11, 2010 Share Posted July 11, 2010 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?) Quote Link to comment Share on other sites More sharing options...
radar Posted July 12, 2010 Share Posted July 12, 2010 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).... Quote Link to comment Share on other sites More sharing options...
gilgimech Posted July 12, 2010 Author Share Posted July 12, 2010 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. Quote Link to comment Share on other sites More sharing options...
radar Posted July 13, 2010 Share Posted July 13, 2010 Depending on how the arcade script is written, you are correct that is a chore ha ha 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.