How do I update a node via a custom form?
You need to use hook_menu() to register the path and callback function, like so:

&lt;?php
function hook_menu() {
  $items['some-path/%node'] = array( // %node will use the node_load() function that's already provided by node.module.
    'type' =&gt; MENU_CALLBACK // This is just a callback item, it will not appear in any "menus"
    'page callback' =&gt; 'drupal_get_form'
    'page arguments' =&gt; array('the_form_function_name', 1) // Where 1 = the %node wildcard
    'access callback' =&gt; 'node_access',
    'access arguments' =&gt; array('update', 1), // The user must be able to update the node
  );
  return $items;
}
?&gt;


Then build a simple form that provides fields to alter on the node, and run node_save() in the submit handler to save any modifications you make to the node.

&lt;?php
function the_form_function_name($form, &amp;$form_state, $node) {
  drupal_set_title('Now editing node ' . check_plain($node-&gt;title));

  // Just store the entire $node object in a custom form property. Easy.
  $form['#node'] = $node;

  // An example form field that we'll use to update the node's title.
  $form['new_title'] = array(
    '#title' =&gt; 'Title',
    '#type' =&gt; 'textfield',
    '#default_value' =&gt; $node-&gt;title,
  );

  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; 'Save Node',
  );

  return $form;
}

function the_form_function_name_submit(&amp;$form, &amp;$form_state) {
  $form['#node']-&gt;title = $form_state['values']['new_title'];
  // Save the modified node object (http://api.drupal.org/node_save)
  if (node_save($form['#node'])) {
    drupal_set_message('Updated the node.');
  } else {
    drupal_set_message('Could not update the node.', 'error');
  }
}
?&gt;


This is just sample code – I have not tested, but it should work barring any typos.

You would hit this via: http://example.com/some-path/123 where 123 is the node ID of the node you want to edit.