[eluser]TWP Marketing[/eluser]
[quote author="Guner ARIK" date="1304048569"]code here
//------------
switch($this->uri->segment(2))
{
case 'login' : return login(); break;
case 'contact' : return contact(); break;
case 'products' : return products(); break;
case 'lang_change' : return lang_change(); break;
}
function login() {
echo "initializing login procedure";
}
function contact() {
echo "initializing cntact form";
}
.............[/quote]
This should be in your CONTROLLER. for instance:
Code:
...
$segment = $this->uri->segment(2);
switch($segment)
{
case 'login': $str = "initializing login procedure"; break;
case 'contact': $str = "initializing contact form"; break;
case 'products': $str = "initializing products form"; break;
case 'lang_change': $str = "initializing language change"; break;
default: $str = "Error, Invalid segment: '".$segment."' passed."; break
}
// now pass the var $str to the view for display
...