Welcome Guest, Not a member yet? Register   Sign In
Login box on a page
#1

[eluser]Unknown[/eluser]
I'm just getting into CodeIgniter and have a question about how to do a login box. I know how to program a login box but I'm wondering how I should do it with codeigniter.

Say I have a controller and view for my homepage. On that homepage I want a login box in the left hand column. Where would I put the code for this login box. It could potentially be on a number of pages, not just the homepage so putting it in the homepage controller doesn't make sense.

Seems like I should create a separate controller for the login box. Then how would I call that controller from the homepage controller.

Any help to get me going in the right direction would be great.
thanks
#2

[eluser]jedd[/eluser]
Hi samtherobot and welcome to the CI forums.

I think [url="http://codeigniter.com/wiki/Header_and_footer_and_menu_on_every_page/"]this page[/url] in the wiki might be helpful - have a read and let me know if that makes sense.

Extending MY_Controller is a very useful thing to do (and nicely documented in the guide) for a range of problems like this.




Theme © iAndrew 2016 - Forum software by © MyBB