Unable to save data from custom drupal form I'm unable to save the details into database after the form is submitted in Drupal 7.

Below is the code for my custom form to save the details to DB,

function form_module_menu() {
  $items = array();
  $items['form_module/form'] = array(
    'title' =&gt; t('Registration form'),
    'page callback' =&gt; 'form_module_form',
    'access arguments' =&gt; array('access content'),
    'description' =&gt; t('Registration Form'),
    'type' =&gt; MENU_CALLBACK,
  );
  return $items;
}

function form_module_form() {
  // This form calls the form builder function via the
  // drupal_get_form() function which takes the name of this form builder
  // function as an argument. It returns the results to display the form.
  return drupal_get_form('form_module_my_form');
}

function form_module_my_form($form_state) {
  $form = array();
    // This is the first form element. It's a textfield with a label, "fName"
  $form['fName'] = array(
        '#type'      =&gt; 'textfield',
        '#title'     =&gt; t('First Name'),
        '#required'  =&gt; TRUE,
        '#size'      =&gt; 60,
        '#maxlength' =&gt; 64,
  );
  // This is the lastname form element. It's a textfield with a label, "lName"
  $form['lName'] = array(
        '#type'     =&gt; 'textfield',
        '#title'    =&gt; t('Last Name'),
  );
  // This is the email address form element. It's a textfield with a label, "email"
  $form['email'] = array(
        '#type'     =&gt; 'textfield',
        '#title'    =&gt; t('Email'),
        '#required' =&gt; TRUE, //must fill this if set to TRUE
        '#rules'    =&gt; array(
                            ),
        '#filters'  =&gt; array('trim', 'uppercase')
  );
  // This is the password and confirm password form element. It's a textfield with a label, "cpwd"
  $form['cpwd'] = array(
        '#type'     =&gt; 'password_confirm',
  );
  $form['submit_button'] = array(
        '#type'     =&gt; 'submit',
        '#value'    =&gt; t('Submit'),
  );
  $form['clear'] = array(
        '#type'     =&gt; 'submit',
        '#value'    =&gt; 'Reset form',
        '#validate' =&gt; array('my_module_my_form_clear'),
  );
  //print l('return to main home page', '&lt;front&gt;');
  return $form;
}

//Rebuild the form
function my_module_my_form_clear($form, &amp;$form_state) {
    $form_state['rebuild'] = TRUE;
}

function form_module_email_validate($element, &amp;$form_state, $form) {
  //email validation not working how to validate email
  $mail = $form_state['values']['email'];
  if (strpos($mail,'@') !== true) {
    form_error($element, t('Please enter a valid email address.'));
  }
  else{
    form_error($element, t('Please enter a valid email address.'));
  }
}

function form_module_my_form_submit($form, &amp;$form_state) {
    drupal_set_message($form_state['values']['fName'].$form_state['values']['lName'].$form_state['values']['email']);
    $sql = "INSERT INTO {customers} (first_name,last_name,email_addr,password) VALUES('%s', '%s', '%s' , '%s')";
    db_query($sql,
        array('%s' =&gt; $form_state['values']['fName']),
        array('%s' =&gt; $form_state['values']['lName']),
        array('%s' =&gt; $form_state['values']['email']),
        array('%s' =&gt; $form_state['values']['cpwd'])
    );
    drupal_set_message(t('Thanks for registering with us. You will receive an email shortly to activate your account.'));
    //after successfully saved how to send mail to user with his login details
}


The submit handler is called and the values are displayed.but in database all rows are filled with '%s'. I new to working in Drupal. How to store passwords and how to save the data and send an email to the user registering..
As stated by @Molot this should not be used generally. Recommended methods would be db_insert and db_merge.

Placeholders are layed wrong, they need to be in single array. Use

 $sql = "INSERT INTO {customers} (first_name,last_name,email_addr,password)
         VALUES(:fName, :lName, :email , :cpwd)";
db_query($sql,
    array(
      ':fName' =&gt; $form_state['values']['fName'],
      ':lName' =&gt; $form_state['values']['lName'],
      ':email' =&gt; $form_state['values']['email'],
      ':cpwd' =&gt; $form_state['values']['cpwd'],
   )
);