0
votes

insert content into page content type,

I have created the drupal custom module, this module display the form(title textbox, text message box, one submit button),

user will enter the message and go for submit,

when form is submitted, i want to insert details into my page content type,

how to achieve this functionality,(overall thing is, content should insert into node, node_revision and related tables if it is there).

please find my module attachment,

click to download the module tweet.module

1

1 Answers

0
votes

If I understand correctly, what you're looking for is hook_nodeapi().

Create a hook in your module using this, and when $op == 'save' or 'update' input the data into the database using db_query(). Or something similar.

Also, check out the examples module for more help.