How to call function after submit button clicked $nid = db_insert('tennis_vana')
  -&gt;fields(array(   'firstname' =&gt; $first,   'lastname' =&gt; $last   ))
  -&gt;execute(); 

unset($form); 
$form_state['rebuild'] = TRUE; 

drupal_set_message("you data has been saved");

$details=project_list1();


this is not working. My requirement is, I want to call and display information from after submit.
If you want to call the function after submit of the form.

Add this part in hook_menu:

function MYMODULE_menu(){

    $items['project'] = array(
    'title' =&gt; 'Project List' ,
    'page callback' =&gt; 'project_list1',
    'access callback' =&gt; TRUE,
    'menu_name' =&gt; 'devel',
    'type' =&gt; MENU_CALLBACK,
    );

 return $items;

}


If you want the menu to appear in main menu you can make these changes: 

     'menu_name' =&gt; 'main-menu',
     'type' =&gt; MENU_NORMAL_ITEM,



Your  function here:


  function project_list1(){
     /////code
    }


And then in your submit function, you can directly add: 

  //Add this in the last line of your submit function
   drupal_goto('project');


This will directly go to the path 'project' and call your function 


  project_list1()