I'm sure I have overlooked it somewhere but I am now aggravated and tired of reading.
I have one form for registration. When someone registers I need the data of that form to populate 2 different databases.
// create member
$set = "firstname = '$firstname'," ;
$set .= "lastname = '$lastname'," ;
$set .= "email = '$email'," ;
$set .= "paypal_email = '$paypal_email'," ;
$set .= "username = '$username'," ;
$set .= "password = '$password'," ;
$set .= "show_oto = '1'," ;
$set .= "referred_by = '$ref'," ;
$set .= "date_joined = now()," ;
$set .= "status = '$status'," ;
$ip = $_SERVER['REMOTE_ADDR'] ;
$set .= "ip = '$ip'," ;
$set .= "jv_status = '0'," ;
$set .= "mailing = '1'," ;
if($rand == '')
{
$rand = md5(uniqid(rand(),1));
}
$set .= "randomstring = '$rand'" ;
$mid = $db->insert_data_id("insert into ".$prefix."members set $set") ;
this code inserts it into the first database.
I then copied the code and altered it using the same variables using the structure from the second database and called it $set2:
// create Downline member
require "http://affilitize.info/a/dlb/config.php";
$set2 = "firstname = '$firstname'," ;
$set2 .= "lastname = '$lastname'," ;
$set2 .= "Email = '$email'," ;
$set2 .= "Username = '$username'," ;
$set2 .= "Password = '$password'," ;
$set2 .= "active = '$status'," ;
$set2 .= "ref_by = '$ref'," ;
$ip = $_SERVER['REMOTE_ADDR'] ;
$set2 .= "IP = '$ip'," ;
$set2 .= "Date = now()," ;
$set2 .= "subscribed = '1'," ;
if($rand == '')
{
$rand = md5(uniqid(rand(),1));
}
$set2 .= "randomstring = '$rand'" ;
$mid = $db->insert_data_id("insert into users set $set2") ;
Any help would be appreciated.
What is the code to switch to the second database to finish submitting the form?
http://www.dbforums.com/db_images_v3...lies/frown.gif