well your model can't save the data if you use the code posted.
The    die(); prevents the save to be executed.
remove the call to die();

On Aug 11, 7:33 pm, stefano <[EMAIL PROTECTED]> wrote:
> hello i have a litle problem with validation data in cakephp1.2
>
> i know that is a noob problem but i can't fix it
>
> i have this controller
>
> var $uses = array('User');
>
>    function index() {
>
>       $ciudades = array(1=>"ConcepciĆ³n",2=>"Hualpen");
>           $this->set("ciudades",$ciudades);
>
>           if (empty($this->data)) {
>          $this->render();
>           }
>       else {
>         pr($this->data);
>         die();
>         $this->data['User']['active'] = 0;
>         $this->data['User']['passwd'] = md5($this->data['User']
> ['passwd']);
>
>         if($this->User->save()) {
>
>         }
>         else {
>                         $this->validateErrors($this->User);
>                         $this->render();
>         }
>       }
>    }
>
>  and
>
> my index.ctp
>
> echo "<h4>email</h4>";
> echo $form->input("User/email",array('label' => false,'size'=>20));
> echo $form->error("User/email","Ingresa un email valido",array('label'
> => false));
>
> the problem is that cakephp is not validating the form :(
>
> sorry for my bad english and my noob question :P


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to