Can any one tel me how to use redirect in controller class.
I am wrote below code:
Controller:-
<?php
class Login extends CI_Controller {
public function result()
{
$name = $this->input->post('name');
$email = $this->input->post('email');
$this->index();
redirect('/success', 'location');
}
}
view:-
success.php
<?php
echo "Success page";
?>
It shows error message 404 Page Not Found. I have load all required helper classes in autoload class.