hook_form_alter() and hook_nodeapi() to alter fields and insert additional data on insert
As mentioned in the comments any extra fields you add to to a node form won't automatically be persisted to the database, the node module only takes care of the fields that it knows about.
Traditionally there are 2 options:
- Use CCK instead and add fields to the node that way. Then you don't need to take care of data storage/loading yourself.
Add your own table for data storage using
hook_schema(), making sure you have a column for
nid(node id). Then in
updateops to run a
db_query()to insert/update the data in that table for the current node.
Then you just need to load that data back from the DB on to the
$nodeobject in the
hook_nodeapi(). Your data will then be available at
$node->field_namewhen you have a node object loaded with