Welcome Guest, Not a member yet? Register   Sign In
Rather Newish to OOP, Controller question
#2

It's a bit confusing. You say that the join method (in the Project controller, right?) loads information from the database and sends that to the join view.
In your code, I see that the enter method opens the join view. It's not clear what the join method does.
What are the URL's that a visitor must type to enter or join a project?

Then, you have this code twice in the same method:
PHP Code:
$this->load->view('includes/nav');
$this->load->view('join');
$this->load->view('includes/footer'); 
You can avoid this, by putting this code outside the if { } structure. Because in the end, you Always want to load the join view, no matter what.

One other thing: you aren't passing any data to the view. But your view is using the $project array. Where does this array come from?
Reply


Messages In This Thread
RE: Rather Newish to OOP, Controller question - by Wouter60 - 05-19-2016, 10:49 PM



Theme © iAndrew 2016 - Forum software by © MyBB