views:

42

answers:

1

I am putting together a site made out of two scripts, with users.

The 2 scripts have info about the members , they will act as one site so I need the users info to be the same on both. When the user fills in the info on the DB1 they should appear in the DB2 as well.

The information fields I would need the same are basic: name, email, phone , website. The edit menu on the second script will be removed, so users can not change data on DB2. So data can come to DB2 only from DB1.

Both databases are on the same server.

+1  A: 

Can you specify which database platform you're using? Some DMBS' contain built-in replication systems for this specific need.

STW
It's a Mysql 5.0.41
Andy
Maybe if i use just before each field i need replicated in DB2 a connection that goes to DB1.I found this code ...$dbcnx = @mysql_connect("localhost", "root", "mypasswd");if (!$dbcnx) { echo( "<p>Unable to connect to the " . "database server at this time.</p>" ); exit();}Is it possible being in DB2 to extract info from DB1 having this code in front of my basic fields : name, email, phone.. ?
Andy
I'm not terrifically familiar with MySQL, but would suggest looking for a DMBS based solution rather than code based. A quick search turned up some MySQL documentation that might be a good place to start: http://dev.mysql.com/doc/refman/5.0/en/replication.html
STW