[eluser]johansonevR[/eluser]
hi there,
I have a function inside a 'model'
Code:
function register($name){
$query=$this->db->query("Select * from users where name='".$name."' ;");
if($query->num_rows()>0){
$error['name']="User with that Name exists";
}
}
I want to send this error to the 'view' so i can design it.
I can call the function from the 'controller'
Code:
$this->my_model->register($name);
but what do i do to access the $error variable?