Reputation: 359
I made a simple login system, with help of codeigniter. I have created a user section where user can see concern data(coming from DB) after login.
I made another controller and module for this but now I am confused How to use two controllers to manage this or if I can make only one model?
so how can I call this model on my home page where user gets redirected after login, please suggest your ideas on this confusion.
for login system i have these files
Controller
(a) login.php
(b) home.php
(c) verfiylogin.phpModels
(a) user.php
Views
(a) home_view.php
(b) login_view.php
For member section
Controller
(a) newsletter.phpModels
(a) newsletter_model.php
Views
(a) home_view.php
same home_view.php call via php
Upvotes: 0
Views: 66
Reputation: 461
why do you make 2 controllers for this? login controller and verfiylogin?
in my opinion the best way to do it is to look at ion auth for codeingiter,create a model and fetch your members list after login in the user or the admin.
PS: LOL Your method is confusing....:))
Upvotes: 1