I got some weird error (CodeIgniter) :
Call to undefined function view().
However I am using login as default controller. index() is loading the page perfectly while loading the view in the function doesn't work.
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_Controller{
public function index(){
$this->load->view('login_view');
}
public function processLogin(){
if(isset($_POST['username']) && isset($_POST['password'])){
if(!empty($_POST['username']) && !empty($_POST['password'])){
$this->load->model("user");
$suc = $this->user->login($_POST['username'],$_POST['password']);
if($suc !=0 && $suc !=-1){
}
else{
if($suc == 0){
$data['error'] = "Invalid credentials";
$this->load>view('login_view',$data);
}
else{
$data['error'] = "Multiple user exist with same logon";
$this->load>view('login_view',$data);
}
}
}
}
}
}
?>