I'm new to this stuff. I've downloaded the latest 1.2 version this
morning. I want create a simple user registration form. So far I have
in my view:
<?=$form->create('User', array('action' => 'register'))?>
<?=$form->input('first_name')?>
<?=$form->input('last_name')?>
<?=$form->input('email')?>
<?=$form->input('username')?>
<?=$form->input('password')?>
<?=$form->password('confirm_password')?>
<?=$form->submit('Register')?>
I took the following function almost directly from the manual:
function register() {
if (empty($this->data)) {
$this->render();
}
else {
if ($this->User->save($this->data)) {
// OK, everything is valid
}
else {
// Validation errors
$this->set('errorMessage', 'Please correct
errors below.');
$this->render();
}
}
}
I have a few questions...
1. What option do I need to pass in the the formHelper::password
method to get a label?
2. How would I check if my password matches the password confirmation?
3. How do I modify my function to md5 encrypt the password before
storing it?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---