1 table on 2 different domains for users

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
wizzard
Forum Commoner
Posts: 93
Joined: Thu May 16, 2002 5:36 am
Location: Belgium
Contact:

1 table on 2 different domains for users

Post by wizzard »

Hi,

I'm having 2 sites with 2 different user tables now i want is that a user registered on site a his also registerd on site b i did that correctly in the script with insert into ....

here's my question

Well if a user sign up on site a and another user sign up on site b at the same time i want that this works correct because the user need the same userid on both tables. Is there a function for something like this?

Regards
Kris
rodrigocaldeira
Forum Commoner
Posts: 27
Joined: Wed Mar 05, 2003 6:40 pm
Location: Brazil
Contact:

Post by rodrigocaldeira »

I suggest you to alter your script to register all user (so site a as site b) into the same table.
wizzard
Forum Commoner
Posts: 93
Joined: Thu May 16, 2002 5:36 am
Location: Belgium
Contact:

Post by wizzard »

it's really not possible i work with postnuke :(
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You're going to have to query the other database when a user tries to register. For example, if someone tries to register on site a you check the site b user table, if they are registered there you give them the same ID as their initial registration, if not you give them the next available ID for site a and insert them into site b's user table as well with the ID from site a.

Mac
wizzard
Forum Commoner
Posts: 93
Joined: Thu May 16, 2002 5:36 am
Location: Belgium
Contact:

Post by wizzard »

thanks for the help.
Post Reply