create view for register and send data to controller
//app::import('Model','Myprofile');
     Class MembersController extends AppController{
    var $name = 'Members';
var $helpers = array('Form','Session');
var $uses = array('Myprofile');//

   function register(){
//$myprofile = new Myprofile();
  if(!empty ($this->data)){
     $this->Member->create();
       if($this->Member->save(($this->data['Member']['username']),
($this->data['Member']['password']))
             &&  $this->Myprofile->save(($this->data['Myprofile']
['name']),($this->data['MyProfile']['address']),($this-
>data['Myprofile']['phonenumber'])))
        {
                    $this->redirect('index');
         }
    }

       else {

             $this->Session->setFlash('failed');
    }

  }
I want to send data form memberscontroller to Myprofile Model
 I try to use $use = array('Myprofile');
i got Undefined property: MembersController::$Member when
 I use //app::import('Model','Myprofile'); //$myprofile = new
Myprofile()
 i got Undefined property: MembersController::$Myprofile
I do not know the right way or not
 There is also another way to fix my problem
Thank for any advice

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to