Welcome Guest, Not a member yet? Register   Sign In
HMVC Login Module
#1

[eluser]otn3m3m[/eluser]
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
#2

[eluser]wiredesignz[/eluser]
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.

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

Good luck. Wink
#3

[eluser]otn3m3m[/eluser]
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.

Thanks,
#4

[eluser]wiredesignz[/eluser]
Sounds good to me.

If it works then thats even better. Wink




Theme © iAndrew 2016 - Forum software by © MyBB