Drupal_goto => POST $result as node Title In order to be able to add a new node whenever a searched string is not found, I've added the following code in my theme directory as search-results.tpl.php.

&lt;?php if ($search_results): ?&gt;
  &lt;h2&gt;&lt;?php print t('Search results');?&gt;&lt;/h2&gt;
  &lt;ol class="search-results &lt;?php print $module; ?&gt;-results"&gt;
    &lt;?php print $search_results; ?&gt;
  &lt;/ol&gt;
  &lt;?php print $pager; ?&gt;
&lt;?php else: ?&gt;
  &lt;?php drupal_goto('node/add'); ?&gt;
&lt;?php endif; ?&gt; 


After clearing the cache, this works fine.

Is it possible to POST the searched string to the node/add section? For example, if I am looking for "car" and the string is not found, I should be redirected to node/add  with "car" showed as node title.
You add this line before your code:

$search_term = arg(2);

Send it in your drupal_goto, but you need to specify which content type to add (here i chose "article"):

&lt;?php drupal_goto('node/add/article', array('query'=&gt;array('title'=&gt;$search_term))); ?&gt;

And hook your node form in a custom module (here I chose content type "Article") :

function MY_MODULE_form_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  // Find the content type of the node we are editing.
  $content_type = $form['#node']-&gt;type;
  if ($content_type == 'article') {
    if(isset($_GET['title'])){
      $form['title']['#default_value'] = $_GET['title'];
    }
  }
}