How to use Form_submit hook? I have a form, automatically generated by a content type. I want to run a form_submit function to input/change some data to get saved in the database.

The content-type already has these fields setup, but I want them to be determined in a form_submit function rather than via user input.

I can get a form submit function, but I don't know how to add to the array of values being submitted without having to write the whole query myself.  What variables do I need to grab and how to alter them to do this?

To be more specific.. in the form_alter, this does what I want. $form["field_org_id"]["und"][0]['value']['#default_value'] = $org-&gt;id; 

But how do I do the equivalent out of site in the form_submit? (this is a content-add form and hoping not to rewrite the entire query)
You have to use hook_form_alter or hook_form_FORM_ID_alter
Add your submit handler to $form['#submit'] like this $form['#submit'][]='my_submit'
And write your code:

function my_submit($form, &amp;$form_state) { 
  // your code
}