[eluser]invision[/eluser]
Hi,
I have a very simple model for adding users to my database.
Code:
function userExists() {
$email = $this->input->post('email');
$this->db->where("email",$email);
$Q = $this->db->get('users');
if ($Q->num_rows() > 0){
return TRUE;
}
}
I run this in my Controller with:
Code:
if ($this->MUsers->userExists() == TRUE)
{
die('bla - exists');
}
Now I wonder, how do I send the message back to my form page and still keep the form elements in place?
I basically just want to add a warning message above my form explaining the email is taken.
Many thanks for any help.