• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
HMVC Login Module

Hello. I was hoping one of you can give me some help as I'm new to CI and even newer to HMVC using ME with CI. I've been able to create a container controller (index.php) that has a master view that loads several other modules in nested views. One of these modules is a "user login". When someone firsts vists the site, the see the login button with the textboxes (user/password), when they submit their login information, I want them to be directed back to the index.php with the login view not longer displaying the textboxes but for example different content "Welcome GUest, you are logged in".

How do I go about doing this ?

Thanks in advance

Generally forms are best posted back to the current controller (main.php) so you can regenerate the view.

This is true for any web form. But with HMVC you can intercept the post and use your results.php module to do its work then simply return to main.php

Welcome to CI forums.

It seems you have altered your question completely, so this answer is irrelevant now.

Good luck. Wink

Thanks wiredesignz for your reponse. I edited my post because I thought it was confusing, but the theory i believe is still the same. This is how i am planning on implementing it. Does this make sense?

0) The master view loads the login module. It displays the not logged module view.
1) User fills in login field and clicks submit
2) The page posts back to the current master view
3) the view passes the post data to the login module
4) the login module determines if the login data is correct and if so shows the logged in view.


Sounds good to me.

If it works then thats even better. Wink

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.