Welcome Guest, Not a member yet? Register   Sign In
Need Refresh in Code Igniter
#2

[eluser]Thorpe Obazee[/eluser]
Code:
redirect('the_last_uri_segments');
You will probably use this.

For example, you are here: http://localhost/page/edit/1 and then save to the same url, you just redirect to redirect('page/edit/1') or redirect(current_url());

Another sample with the same principle:

Code:
if ($this->form_validation->run('calendar_add') === TRUE)
{
    $this->calendars_model->name = $this->input->post('name');
    $this->calendars_model->description = $this->input->post('description');
    $this->calendars_model->save($id);
    $this->session->set_flashdata('message', 'Calendar Saved');
    redirect(current_url());
}


Messages In This Thread
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:02 PM
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:12 PM
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:17 PM
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:19 PM
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:25 PM
Need Refresh in Code Igniter - by El Forum - 05-17-2009, 11:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB