Show errors in Login view in Codeigniter

0

I am new and I do not have much idea of the use of Codeigniter . The case Do you know if there is any way to return a comment (error) to a view, from the controller, once having made a query of a model ?. That is:

  • I fill in a login form and I sign in
  • takes me to a controller method (which is also responsible for loading the view, using Index() )
  • that method called login() uses a return of a query received from the model.
  • if the query returns an error or a failure because there are no users, it gets into a conditional if() .
  • if($error=true){ Here I want you to load the same view of the same form and send you a $ data with a message. And it does not work for me to do $this->load->viene('login', $data)
  • the purpose is to do something visual so you know that you could not log in
  • asked by MANU MORUNO 22.05.2018 в 21:49
    source

    0 answers