Redirection in PHP is not working Server -


here php script redirect admin page. code working fine in localhost go server not redirected.
value should check , validated problem page not redirected
don't know why happening right now.any guys.

if ($this->session->userdata('admin_login') == 1)     redirect(base_url() . 'index.php?admin/dashboard', 'refresh'); 

in above code please check if base_url() returns value or not.

if redirection aim can use php header() function. use below code have written

if ($this->session->userdata('admin_login') == 1)     header('location:'.base_url().'index.php?admin/dashboard', 'refresh'); 

i hope helps you.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -