Answers for "redirect to back page in codeigniter"

PHP
2

redirect in codeigniter

//You can use redirect in codeigniter by loading helper 'url'
$this->load->helper('url');

//The redirects functions accepts two parameters to execute the function first is 'Location Url' and second parameter allows the developer to use different HTTP commands to perform the redirect "location" or "refresh".
if (!$user_logged_in)
{
  redirect('/account/login', 'refresh');
}
Posted by: Guest on June-04-2020
0

redirect back in codeigniter

This should help :
http://www.codeigniter.com/user_guide/libraries/user_agent.html

$this->load->library('user_agent');
if ($this->agent->is_referral()){
    echo $this->agent->referrer();
}

or straight PHP:

redirect($_SERVER['HTTP_REFERER']);
Posted by: Guest on December-24-2020

Code answers related to "redirect to back page in codeigniter"

Browse Popular Code Answers by Language