Welcome Guest, Not a member yet? Register   Sign In
USER LOGIN and INFORMATION in header.
#1

[eluser]Unknown[/eluser]
I'm using Adam Griffiths login system and I'm trying to make it where everypage will be able to show a login if they're not logged in and if they are logged in, the information. Similar to the codeigniter forums. I've tried to put the logincheck code in the index page where everything is but since this will be a global thing, how would I make it where it will work on every page and even show the errors?
#2

[eluser]kanjimaster[/eluser]
Difficult to be definitive or very specific without knowing how you build your pages, but in principle:

1. Create a MY_Controller the does the check and makes the answer available then have all your other controllers extend it so that it's available everywhere.

2. Have a common partial view (e.g. header.php) that's included in all your page views and which uses the now universally available answer.
#3

[eluser]Unknown[/eluser]
[quote author="kanjimaster" date="1339749761"]Difficult to be definitive or very specific without knowing how you build your pages, but in principle:

1. Create a MY_Controller the does the check and makes the answer available then have all your other controllers extend it so that it's available everywhere.

2. Have a common partial view (e.g. header.php) that's included in all your page views and which uses the now universally available answer.[/quote]

I did what you said and it works great! Thank you for the help.




Theme © iAndrew 2016 - Forum software by © MyBB