Adding link with image in the .tpl.php file I have just started with drupal and have very little understanding and experience with it. I was able to develop a module by referring to sample modules available online. I have a .tpl.php file that is supposed to have a link in the form of an image, I am hoping to execute a php function (php function is ready) by clicking on that image. 
So my question is how to add a link inside the .tpl.php file, do I have to implement a form? if so, what file should have this form? How to execute the php function on click from this link? 

Please let me know if the question doesn't make enough sense.

Thanks
I think what you want is something to link to that will execute your PHP "callback". Have a look at hook_menu() in the Drupal API. 

Here's an example:

/**
 * Implements hook_menu().
 */
function MODULENAME_menu() {
  $items = array();
  $items['mymodule/callback'] = array(
    'page callback' =&gt; 'MODULENAME_do_callback',
    'access arguments' =&gt; array('access content'), // You can specify a permission here.
    'type' =&gt; MENU_CALLBACK,
  );
  return $items;
}

function MODULENAME_do_callback() {
  // your php here
}


With that you should be able to link your image (just with standard HTML) to yourdomain.com/mymodule/callback and it will execute your code. 

Note: Be sure to clear all caches after adding your hook_menu() implementation.