[eluser]Ngulo[/eluser]
hi all i have a controller (downloads.php) with this function (templates) after the main index():
Code:
function templates()
{
$tab_from_uri=$this->uri->segment(3);
switch($tab_form_uri)
{
case "1":
$tab = "tab1";
break;
case "2":
$tab = "tab2";
break;
case "3":
$tab ="tab3";
break;
}
$data['asd']=$this->db->order_by("data_templx","asc")->get(''.$tab);
$this->load->view('downloads_view',$data);
}
my links are
Code:
anchor('downloads/templates','List')
so they took me rightly to /index.php/downloads/templates/3 ...as i want
but,when i click the link ,loading the view,i take this error:
Code:
Message: Undefined variable: tab_form_uri
i can't find any error,i've prooved also changing uri->segment(3) to uri->segment(4)......this is not the problem i guess
any suggestions?