FormaL
FormaL

Reputation: 359

codeigniter - Two Controllers

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

  1. Controller
    (a) login.php
    (b) home.php
    (c) verfiylogin.php

  2. Models
    (a) user.php

  3. Views
    (a) home_view.php
    (b) login_view.php

For member section

  1. Controller
    (a) newsletter.php

  2. Models
    (a) newsletter_model.php

  3. Views
    (a) home_view.php
    same home_view.php call via php

Upvotes: 0

Views: 66

Answers (1)

Alex
Alex

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

Related Questions