Hi looking for some help. I recently started coding with Codeigniter.
I have 2 functions within the same controller. I need 'uri segment' from first function to second. Tried to google but no success.
Here is my controller:
public item_page() {
$id = $this->uri->segment(3);
$this->load->view('view');
}
public validation() {
// Form Validation Goes Here
if($this->form_validation->run() == FALSE) {
$this->session->set_userdata('validation_errors', validation_errors());
redirect('item-page/'.$id); // I need variable here
} else {
redirect('execute');
}
}