Welcome Guest, Not a member yet? Register   Sign In
add_error
#1

[eluser]tom.waters[/eluser]
I am trying to add an error in my model. Here is the code.

function samepassword($form)
{
echo '<pre>'.print_r(var_dump($_POST)).'</pre>';
if ($_REQUEST['membpassword'] != $_REQUEST['membpassword2'])
{
$form->add_error('membPassword2', 'Your passwords do not match!');

return FALSE;
}
}

Can anyone tell me what I am doing wrong?

The error I get is

Call to a member function add_error() on a non-object in C:\wamp\www\perkci\application\controllers\login.php on line 81




Theme © iAndrew 2016 - Forum software by © MyBB