How to insert records in different table function lawyer_register_form($form,&amp;$form_submit) 
{
$form = array();
$form['name'] = array(
    '#title' =&gt; 'Username',
    '#description' =&gt; 'choose a username',
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
);

$form['mail'] = array(
    '#title' =&gt; 'email',
    '#description' =&gt; 'enter a valid email address',
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
);

 $form['fname'] = array(
 '#title' =&gt; t('Full Name'),
 '#type' =&gt; 'textfield',
 '#size' =&gt; 20,
 '#maxlength' =&gt; 20,
);

 $form['phone_no'] = array(
 '#title' =&gt; t('phone_no'),
 '#type' =&gt; 'textfield',
 '#description' =&gt; t(''),
 '#size' =&gt; 20,
 '#maxlength' =&gt; 20,
);

$form['street_address'] = array(
'#title' =&gt; t('Street Address'),
'#type' =&gt; 'textfield',
'#size' =&gt; 50,
'#maxlength' =&gt; 100,
);        



$form['county'] = array(
'#title' =&gt; t('County'),
'#type' =&gt; 'textfield',
'#autocomplete_path' =&gt; 'lawyer_register-autocomplete-engine',
'#size' =&gt; 20,
'#maxlength' =&gt; 20,
 );       

$form['send_message'] = array(
    '#type' =&gt; 'checkbox',
    '#title' =&gt; t('Notify user of new account via email.'),
    '#description' =&gt; 'If left unchecked, a message will not be sent.',
    '#default_value' =&gt; 1,
 );

 $form['submit'] = array(
  '#value' =&gt; 'Submit',
 '#type' =&gt; 'submit'
 ); 
 return $form;
 }


 function lawyer_register_form_submit($form, &amp;$form_submit)
 {
 $new_password = user_password();
 $edit = array(
  'name' =&gt; $form_submit['values']['name'],
  'pass' =&gt; $new_password,
  'mail' =&gt; $form_submit['values']['mail'],
  'init' =&gt; $form_submit['values']['mail'],
  'status' =&gt; 1,
  'access' =&gt; REQUEST_TIME,
  ');
   $edita=$edit-&gt;uid;
  db_insert('field_data_field_name')
  -&gt;fields(array(
'entity_type' =&gt; 'user',
'bundle' =&gt; 'user',
'deleted' =&gt; 0,
'entity_id' =&gt; $edita,
'language' =&gt; 'und',
'delta' =&gt; 0,
'field_name_value' =&gt;$form_submit['values']['fname'],
))-&gt;execute();
   db_insert('field_data_field_county')
-&gt;fields(array(
'entity_type' =&gt; 'user',
'bundle' =&gt; 'user',
'deleted' =&gt; 0,
'entity_id' =&gt; $edita,
'language' =&gt; 'und',
'delta' =&gt; 0,
'field_county_value' =&gt;$form_submit['values']['county'],
))
-&gt;execute();
    db_insert('field_data_field_address')
-&gt;fields(array(
'entity_type' =&gt; 'user',
'bundle' =&gt; 'user',
'deleted' =&gt; 0,
'entity_id' =&gt; $edita,
'language' =&gt; 'und',
'delta' =&gt; 0,
'field_address_value' =&gt;$form_submit['values']['street_address'],
))-&gt;execute();
    db_insert('field_data_field_phone_no')
-&gt;fields(array(
'entity_type' =&gt; 'user',
'bundle' =&gt; 'user',
'deleted' =&gt; 0,
'entity_id' =&gt; $edita,
'language' =&gt; 'und',
'delta' =&gt; 0,
'field_userphone_value' =&gt;$form_submit['values']['phone_no'],
))-&gt;execute();

   user_save(drupal_anonymous_user(), $edit);


I have already created table in database. I want to insert value of 

fname, street_address, phone_no &amp; county


In those table. How is it possible?

I have searched lots of time in google but not getting right answer.
if you wants to simple insert the field values in a different table you can write insert query in form submit.

 function lawyer_register_form($form,&amp;$form_state) 
{
$form = array();
$form['name'] = array(
    '#title' =&gt; 'Username',
    '#description' =&gt; 'choose a username',
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
);

$form['mail'] = array(
    '#title' =&gt; 'email',
    '#description' =&gt; 'enter a valid email address',
    '#type' =&gt; 'textfield',
    '#required' =&gt; TRUE,
);

 $form['fname'] = array(
 '#title' =&gt; t('Full Name'),
 '#type' =&gt; 'textfield',
 '#size' =&gt; 20,
 '#maxlength' =&gt; 20,
);

 $form['phone_no'] = array(
 '#title' =&gt; t('phone_no'),
 '#type' =&gt; 'textfield',
 '#description' =&gt; t(''),
 '#size' =&gt; 20,
 '#maxlength' =&gt; 20,
);

$form['street_address'] = array(
'#title' =&gt; t('Street Address'),
'#type' =&gt; 'textfield',
'#size' =&gt; 50,
'#maxlength' =&gt; 100,
);        



$form['county'] = array(
'#title' =&gt; t('County'),
'#type' =&gt; 'textfield',
'#autocomplete_path' =&gt; 'lawyer_register-autocomplete-engine',
'#size' =&gt; 20,
'#maxlength' =&gt; 20,
 );       

$form['send_message'] = array(
    '#type' =&gt; 'checkbox',
    '#title' =&gt; t('Notify user of new account via email.'),
    '#description' =&gt; 'If left unchecked, a message will not be sent.',
    '#default_value' =&gt; 1,
 );

 $form['submit'] = array(
  '#value' =&gt; 'Submit',
 '#type' =&gt; 'submit'
 ); 
 return $form;
 }



    function lawyer_register_form_submit($form, &amp;$form_state)
         {
         $username = $form_state['values']['name'];
         $new_password = user_password();
         $edit = array(
          'name' =&gt;  $form_state['values']['name'],
          'pass' =&gt; $new_password,
          'mail' =&gt; $form_state['values']['mail'],
          'init' =&gt;  $form_state['values']['mail'],
          'status' =&gt; 1,
          'access' =&gt; REQUEST_TIME,
          'field_first_fname' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt;     $form_state['values']['fname']))),
          'field_first_street_address' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt;  $form_state['values']['street_address']))),
          'field_first_phone_no' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt;  $form_state['values']['phone_no']))),
          'field_first_county' =&gt; array(LANGUAGE_NONE =&gt; array(array('value' =&gt;  $form_state['values']['county']))),
          );

    user_save(NULL, $edit);
$user_id = db_query("SELECT uid FROM {users} WHERE name = :username", array(':username' =&gt; $username))-&gt;fetchField();

        $insert = db_insert('table_name') // in which table you want to insert
                  -&gt; fields(array(
                        'uid' =&gt; $user_id,
                        'fname' =&gt; $form_state['values']['fname'],
                        'country' =&gt; $form_state['values']['country'],
                        'phone_no' =&gt; $form_state['values']['phone_no'],
                       //write other fields you want to save
                        ))-&gt;execute();
                }