Create custom controller on front end module in magento

Note:- you can download code from this rar_image
Note:-1) Firstly Disable the all cache from Cache Management tab in System tab.
2) select the default theme of the magento from the System->Design.

Step1:- Create Mywork_Usecontroller.xml file in app/etc/modules/.
where Mywork is Namespace and Usecontroller is Modulename.

<?xml version="1.0"?>
<config>
    <modules>
        <Mywork_Usecontroller>
            <active>true</active>
            <codePool>local</codePool>
        </Mywork_Usecontroller>
    </modules>
</config>

Note:- 1) If you want to active the extensions then use true otherwise false.
2) there are three code pool (a) local (b) core (c) community
when we create the own extension then we use local code pool.

Step2:- Now create the config.xml file in app/code/local/Mywork/Usecontroller/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mywork_Usecontroller>
            <version>1.0.0</version>
        </Mywork_Usecontroller>
    </modules>

    <frontend>
        <routers>
            <usecontroller>
                <use>standard</use>
                <args>
                    <module>Mywork_Usecontroller</module>
                    <frontName>usecontroller</frontName>
                </args>
            </usecontroller>
        </routers>
  </frontend>	
</config>

Note:- 1) In this file we created version of this module is 1.0.0
2) In the frontend tag we created routers tag. In routers tag we define the frontend name is usecontroller,
and we access the extension value from siteurl/usecontroller.

Step3:- Now we create the IndexController.php in app/code/local/Mywork/Usecontroller/controllers/IndexController.php

<?php
class Mywork_Usecontroller_IndexController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        
       echo 'hello index action call on index controller';
        
    }
    
    public function myinfoAction() {
        
      echo 'hello myinfo action call on index controller';
       
    }
}
?>

Step4:- Now we create the GetvalueController.php in app/code/local/Mywork/Usecontroller/controllers/GetvalueController.php

<?php
class Mywork_Usecontroller_GetvalueController extends Mage_Core_Controller_Front_Action {

    public function indexAction() {
        echo 'hello index action call on Getvalue Controller';
    }
    
    public function myinfoAction() {
       echo 'hello myinfo action call on Getvalue Controller';
   }
}
?>

Note:- Call the url:-
1) siteurl/usecontroller/ Output:- hello index action call on index conroller
2) siteurl/usecontroller/index/myinfo Output:- hello myinfo action call on index conroller
3) siteurl/usecontroller/index/getvalue Output:- hello index action call on Getvalue Controller
4) siteurl/usecontroller/index/getvalue/myinfo Output:- hello myinfo action call on Getvalue Controller