ok, this is my View call add.ctp

<h2>Create an Account</h2>
<?php
echo $this->$form->create('User', array('action' => 'add'));
  echo $this->$form->input('username');
  echo $this->$form->input('password', array('type' => 'password'));
  echo $this->$form->input('password_confirm', array('type' => 'password'));
  echo $this->$form->submit();
  echo $this->$form->end();
?>

my Model 
<?php
class User extends AppModel{
 var $name = 'User';
}
?>

 and my Controller

<?php
class UsersController extends AppController{

var $name = 'Users';
# needed for 'register'
var $helpers = array('Html', 'Form');

public function index(){
}
 function add() {
        if (!empty($this->data)) {
            if ($this->data['User']['password'] == 
$this->Auth->password($this->data['User']['password_confirm'])){
        $this->User->create();
        if($this->User->save($this->data)){
          $this->Auth->login($this->data);
          $this->redirect(array('action' => 'index'));
        }
}
}
    }
}
?>

El lunes, 10 de junio de 2013 18:20:21 UTC-5, alfredo davila escribió:
>
> I can´t stop dealing with this problem in my cakephp :S I think it´s 
> problem of the Model or the View.
> Can anyone help me? :S
>

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to