How to get the node id before saving the node in drupal 6? I have created a content type called 'inquiry.'  I am using the rules module to send an email after submitting an inquiry.  My requirement is to get the node id before it is saved.  I need to generate a link from that node id so the inquiry handler can view the inquiry by clicking on that link.
You can use hook_nodeapi presave option to get node content before saving the node.

Example : 

function MODULENAME_nodeapi(&amp;$node, $op, $a3 = NULL, $a4 = NULL) {
  switch ($op) {
    case 'presave':
      print $node-&gt;nid;
      exit;
    break;
  }
}