Updating field in external Drupal database
I have achieved the similar functionality with following code. I worked on Drupal 6. But, hopefully it worked for you.

I have two same drupal installation and when creating new node in one installation, I need to create node into another Drupal installation also. So, I customize the node form and added a submit function to node form.

Custom Submit function

function custom_node_export_form_submit($form, $form_state) {

  //Creating node object
  $node = new stdClass;

  foreach ($form_state['values'] as $key =&gt; $value) {
    $node-&gt;$key = $value;    
  }

  db_set_active('domain');

  node_save($node);

  db_set_active('default');  

}