Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Upon Registration on One Site | Register on a Forum
#1
I want to, on registration with one site (and RPG Game) have an automatic registration on a forum (MyBB) on another site. I'm not 100% sure how to do this though Sad

Pretty much I want a script that will, upon clicking Register, create the user on the site for registration in that DB, then go to the MyBB forum and create the new account using the same username and password.
Do you know how to make games? Do you know 3d Modeling? If so then visit
[Image: logo.png]
Reply
#2
Are you using the same users table to load user data from both sides.
In that case you can just either, redirect a registration form to the same url as myBB one does or you can copy the SQL command of myBB.

Reply
#3
Lol that rep was for the last thing you helped me on.

I believe the tables are named something else in each one.
Do you know how to make games? Do you know 3d Modeling? If so then visit
[Image: logo.png]
Reply
#4
But they are still in the same databse?
If and if not you still can just write up a custom sql_query that will insert the needed things into myBB table
If they are not in the same db then you'll also need a new connection.

Just take a look on what data myBB saves upon the registration and copy that query based on your other form inputs.
For a login I would then check for the myBB cookie when loging the user into the Game.
Reply
#5
Yeah, I'll have to play around with it, I'm still new to the SQL part of PHP so it may take a little bit of trial and error. The DB's are different DB's that are part of a completely different domain. Is that possible? I may look at making an individual forum for each game, instead of running wtih one centralized forum, that may be the easiest way to do it, and just have the forum and game run out of the same DB. It would be like game.com adn then forum.game.com.
Do you know how to make games? Do you know 3d Modeling? If so then visit
[Image: logo.png]
Reply
#6
Well own forums are always better, but yes it's possible to load from different hosts.
A configuration array would be:

PHP Code:
$config = array(
    
'host' => 'localhost'// or you change it to your diff sql host ex: sql.example.com
    
'user' => 'root',
    
'pass' => '',
    
'base' => 'game_users'


You need to change the "host" and point it to a remote host. And also use the user and password that one db uses..
Everything other is simple mysql_connect, mysql_select, mysql_query, etc..

Here is a simple connection tut.
http://www.supportforums.net/showthread.php?tid=116
Reply
#7
Thanks, I'll fiddle around with it some once I get my laptop back. I'm trying to get a few things knocked out while I don't have it.
Do you know how to make games? Do you know 3d Modeling? If so then visit
[Image: logo.png]
Reply
#8
What you're basically doing is trying one script to modify two databases, the game and the forum. You could do this manually. i.e. have an sql query for the first database, close the connection, open a connection on the second database, insert everything, and close it. It's a lot of work, I know. The other thing you could try to do, is find a way to call the script that the forum uses to add a member. I'm not quite sure how to do this, but all it really takes is a post request. Either way works, the second one _might_ be a little bit simpler, though.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  User register page riptpage 0 1,189 10-27-2012, 06:40 AM
Last Post: riptpage
  [PHP] Login && Register With Remember Me Option [mySQL] Bartdevil 18 7,743 10-26-2009, 07:54 AM
Last Post: Bartdevil

Forum Jump:


Users browsing this thread: 2 Guest(s)