how to add form data in database My registration form is multi-step and the form is shown in popup. I m using lighbox2 for popup and working perfectly fine and i have added the form filed in a file that comes with lightbox2 and place in template folder and everything work fine, but the issue is how i can add the form data in database?

I use ajax when the ajax request sent it says access forbidden. 

how I can insert data in database using ajax because my form is multi-step?
You'll need to define an ajax callback. This callback function can then be called by the form, and can submit values to the database for you using the Drupal database layer. In this case, I imagine the ajax handler will be added to the Next or Submit button.

$form['next'] = array(
  '#type' =&gt; 'submit',
  '#value' =&gt; t('Submit'),
  '#ajax' =&gt; array(
    'callback' =&gt; 'custom_ajax_callback'
  ),
);


Your module might also want to define its own database table to store temporary values for this.