How to call a drupal custom module function from a basic page? * if i will click a input button in basic page a particular function should be called from my custom module. I have already enabled my
 module in my instance.*

&lt;?php 
$name = $_POST['name'];
$pwd = $_POST['pwd'];
homeFun($name,$pwd)
?&gt;
&lt;form method="post" action="&lt;?php $_SERVER['PHP_SELF'] ?&gt;"&gt;
&lt;p&gt;Name&lt;br&gt; &lt;input type="text" name="name"&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;Password:&lt;br&gt;&lt;input type="password" name="pwd"&gt;&lt;br&gt;&lt;/p&gt;
&lt;input type="submit"  value="Register"&gt;
&lt;/form&gt;


i am using this code...and its working but the problem is while refreshing the page, function automatically gets called without clicking button...
I wrote this code in Basic Page...


  Please guys tell me the proper way to call the functioin from my basic
  page.


I just wanted to execute my cutome module function after clicking submit button...is there any simple way to do that...
I guess you want to create a menu callback which will call your form right? 
Here is how to-

Create your menu hook like bellow:

function mymodule_menu($node) {
  $items['my-frm'] = array(
    'type' =&gt; MENU_CALLBACK,
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('my_form'),
    'access callback' =&gt; TRUE,
  );
  return $items;
}


Than create your form like below:

function my_form() {
  $form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; t('Submit'),
  ); 
  return $form;
}


And after that here is your form submit:

function my_form_submit() {
  drupal_set_message("Hello World my form submit hook is called here");  
}


Do a clear cache and navigate to yoursite/my-frm link you should see your form.