This is my first question on StackOverflow. I’m starting with my first development in codeigniter and I have a question with the views. In my controller I load the view in the index function, but I want to load another from a method in the same controller. How do I do it? Need another controller to the resend method?
public function index($_msg = NULL)
{
$data['title'] = 'The title';
$data['msg'] = $_msg;
$this->load->view(DIRECTORIO_ADMIN . '/login_view2', $data);
}
public function procesar(){
{
//some code here
}
public function reenviar_password(){
{
$this->load->view(DIRECTORIO_ADMIN . '/resend_password_view');
}
As per your comments I get to know that you want to show login view using index method, and forgot password view when user clicks on “forgot password” link and it is on Login view
For doing this you have to do like this: Create a login page and add a url for “Forgot password” and add a forgot password functions url to it so that when user click on “Forgot password” they will get redirect to http://example.com/index.php/controller/reenviar_password