Welcome Guest, Not a member yet? Register   Sign In
Uri Class problem
#1

[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 Smile

any suggestions?


Messages In This Thread
Uri Class problem - by El Forum - 04-14-2010, 03:05 PM
Uri Class problem - by El Forum - 04-14-2010, 03:17 PM
Uri Class problem - by El Forum - 04-14-2010, 03:23 PM
Uri Class problem - by El Forum - 04-14-2010, 04:01 PM
Uri Class problem - by El Forum - 04-15-2010, 06:54 AM
Uri Class problem - by El Forum - 04-15-2010, 11:31 AM
Uri Class problem - by El Forum - 04-15-2010, 04:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB