2 php systems
Posted: Mon Oct 27, 2008 2:29 am
Hello, I have 2 php systems setup on the same server and sharing the same database !
They both have a table called (dbprefix)users which stores informations about users register on their system .They have common fields but also dinstict fields.
What i whant to do is have the one register form to create the user in both systems ?
System one works with post method to insert users
System 2 works with api
for inserting users to the second system :
require_once ( '/path_to/the_api_folder/api_users.php' );
// initiate the class
$api = new Login_api_users ();
// Adds a new user
$args = array
(//associative array with arguments
'username' => 'the username of the new member',
'password' => 'the password of the new member',
'email' => 'the pemail of the new member',
'level_access' => 'level_access/role id/group id',
'active' => 'status (0=inactive, 1=active, 2=suspended)',
'user_form_data'=> 'any custom form fields (associative array)',
);
$api->add_user ( $args );
to you have any suggestion on how i should move forward to solve this ?
They both have a table called (dbprefix)users which stores informations about users register on their system .They have common fields but also dinstict fields.
What i whant to do is have the one register form to create the user in both systems ?
System one works with post method to insert users
System 2 works with api
for inserting users to the second system :
require_once ( '/path_to/the_api_folder/api_users.php' );
// initiate the class
$api = new Login_api_users ();
// Adds a new user
$args = array
(//associative array with arguments
'username' => 'the username of the new member',
'password' => 'the password of the new member',
'email' => 'the pemail of the new member',
'level_access' => 'level_access/role id/group id',
'active' => 'status (0=inactive, 1=active, 2=suspended)',
'user_form_data'=> 'any custom form fields (associative array)',
);
$api->add_user ( $args );
to you have any suggestion on how i should move forward to solve this ?