Welcome Guest, Not a member yet? Register   Sign In
OMG Noob stuck again!!!
#1

[eluser]JimmyJ[/eluser]
Ok, I've created a browse page that im looking to display database info passed from the id in the url.

The url looks like: http://localhost/index.php/browse/2

My browse.php controller looks like this:

Code:
<?php

class Browse extends Controller {
        
    
    function index()
    {        
        
        parent::Controller();
    }
    
    
    function browse()
    {        
        
        //parent::Controller();    
        //$this->db->where('region_id', $this->uri->segment(2));
        //$data['query'] = $this->db->get('counties');
        
        //$data['title'] = "My Title";
        $this->load->view('browse_props');
        
        echo 'hello';
    }
    
}
?>

This gives me the following error:

Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined property: Browse::$load

Filename: controllers/browse.php

Line Number: 21

Fatal error: Call to a member function view() on a non-object in E:\wamp\www\system\application\controllers\browse.php on line 21

I have my browse_props.php in the views folder.

If I edit the code above and hide the load->view, it will echo "hello" but with a 404 message below?

Anyone know what i'm doing wrong? Am I a total noob?


Messages In This Thread
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 02:44 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 02:48 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 02:51 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 03:53 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 04:31 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 04:51 PM
OMG Noob stuck again!!! - by El Forum - 11-29-2007, 05:29 PM
OMG Noob stuck again!!! - by El Forum - 11-30-2007, 04:34 AM
OMG Noob stuck again!!! - by El Forum - 11-30-2007, 11:56 AM



Theme © iAndrew 2016 - Forum software by © MyBB