I know drupal a bit.
I am creating a custom theme and defined a region in my themename.info as
regions[search] = Search Bar
And added the below code to my page.tpl.php
<div id="search" class="search_box">
<?php if ($page['search']): ?>
<?php print render($page['search']); ?>
<?php endif; ?>
</div>
And I enabled search form via Block administration, so everything is fine now.
But, I want to create my custom search module. Please provide me some sample code, so that I can understand.
In explanation, I want to create a hook menu and function which can print what I want and also how can I enable the function to be printed on the region.
Thanks all.