Digital World Freelancer

The Digital World Freelancer group is applying latest Technologies Like HTML, CSS, CSS3, JavaScript, JQuery, PHP and more...... for website designing & developing... reach at our organization http://www.digitalworldfreelancer.com

Facebook Page

Thursday, October 29, 2015

How to redirect from a page into another page when condition is true or false in Codeigniter?

Use the redirect() function from the URL Helper.
EDIT: load the url helper:
Example:-
$this->load->helper('url');
if (condition == TRUE) {
   redirect('new_page');
}
Example:-
Use redirect() helper function.

Example :

$this->load->helper('url');

if ($logged_in == FALSE)
{
     redirect('/login/form/', 'refresh');
}

No comments: