In the page that you want to go back to you can do:

<?php $this->session->set_userdata('referred_from', current_url()); ?>

Then from controller you want to back:

$referred_from = $this->session->userdata('referred_from'); 
redirect($referred_from, 'refresh');

working-on-a-computer-smiley-emoticon

Categories: CodeIgniter

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *