Welcome Guest, Not a member yet? Register   Sign In
Working with URI, getting a wrong view..
#1

[eluser]pstp[/eluser]
As the tittle, I work with uri, and the browser said that page not found.
This is my controller, lab.php:
Code:
function index()
    {    
        $id=$this->uri->segment(2);
        $new_data['new_data']= $this->profile_model->is_profile($id);
            
        if ($new_data)//if there is profile with id= session_id, load profile_view (see the query in Profile_model)
        {    
            $data['data']=array(
            'main_content'=>'profile/profile_view',
            'new_data'=>$new_data,
            );
            $this->load->view('include/template', $data);
        }
        else
        {
            $this->create_profile();
        }
        
    }

I have made a view named profile_view.php, also the profile_model. The browser shows Page not found for the url: http://localhost/kokko/lab/1 (1 here is the 2nd segment).
What happened here guys??


Messages In This Thread
Working with URI, getting a wrong view.. - by El Forum - 08-29-2010, 02:47 AM
Working with URI, getting a wrong view.. - by El Forum - 08-29-2010, 04:53 AM
Working with URI, getting a wrong view.. - by El Forum - 08-29-2010, 05:26 AM
Working with URI, getting a wrong view.. - by El Forum - 08-29-2010, 06:14 AM
Working with URI, getting a wrong view.. - by El Forum - 08-29-2010, 07:59 AM



Theme © iAndrew 2016 - Forum software by © MyBB