Redirect, but how stay in actuall page? |
[eluser]Martin_new[/eluser]
Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); I have this code. And I want check if user is logged in, everything is ok, re redirect is gooood. But in "HERE" I want to stay in actuall page, no refresh or redirect. How can I do it? And another question. How can I check if the user is logged in, in every page?
[eluser]Martin_new[/eluser]
It`s not good solution. When I use Code: current_url()
[eluser]gmcms[/eluser]
Quote:And another question. How can I check if the user is logged in, in every page?You can use a hook to check for user logged in on every controller call or extends CI_Controller. Regards
[eluser]Barwick[/eluser]
[quote author="Martin_new" date="1351543748"] And another question. How can I check if the user is logged in, in every page? [/quote] Just store "logged_in" session in your model and check for it on every controller you need it to. Have it validate and then run your methods, etc. For example: Code: public function index()
[eluser]Juan Velandia[/eluser]
post your code, Its really strange you get a doble URL... |
Welcome Guest, Not a member yet? Register Sign In |