I'm using Codeigniter and the Ionauth library to manage users. The structure I'm using is as follows:
Controllers:
- home
- auth
Views:
- home
- home_view.php
- templates
- header.php
- footer.php
- auth
- login
- register
When I create my home view, it adds the header.php and footer.php templates and passes it's own data into the main body.
My issue is, I'd like to use my login function within the header.php file
(within a form), however, this isn't currently possible because my login function is situated in the /auth/
controller. Would it be possible for me to use this login function outside of the /auth/
controller, I.e. in the header.php file within the /templates/
folder?
If not, are there any possible solutions you can propose?
Thanks