I want confirm password to be validated. (Both password and confirm
password should be same)
views:
Password
<?php echo $html->tagErrorMsg('Client/password', 'Password is
required.') ?>
<?php echo $html->input('Client/password', array('size' =>
'10'))?>
<p>
Confirm Password
<?php echo $html->tagErrorMsg('Client/confirm_password',
'Confirm
Password is required.') ?>
<?php echo $html->input('Client/confirm_password', array('size'
=>
'10'))?> <p>
controller:
function index() {
if (!empty($this->data))
{
if(($this->data['Client']['password'])!=($this->data['Client']
['confirm_password']))
$this->Client->invalidate('confirm_password');
if ($this->Client->save($this->data))
{
$this->flash('Your post has been saved.','/clients/
register2');
}
else
{
$this->render();
}
}
}
The above code is not working.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---