Use requestAction() to call a method from another controller.
For eg. From Profile Controller, if you want to call a method to save data to User DB, you could do
$this->requestAction('users/saveToDb', $unSerializedData);
The second argument to the above is an array of values to be passed.
The data gets available now in $this->params.
So, in saveToDb, you can define it as -
$this->User->data = "">
$this->User->data = "">
Then call,
if($this->User->save($this->User->data )) {
//save successful
}
Hope this helps!
Regards,
Mandy.
On 8/22/06, blackberry <[EMAIL PROTECTED]> wrote:
I have a page to register user.
in DB,there are 2 tabels.:users, profiles.
users table has below fields:
id,
email,
password.
profiles table has:
id,
user_id,
last_name,
...
here user_id is the id in Users table.
In the registration page, email, password, last_name etc, fields need
to input.
My question is :
How to insert the data from registration page into the seperate
tables?
I have defined User, Profile models, and
UserControllers,ProfileController controllers.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---
- How to register a user? blackberry
- Re: How to register a user? Mandy Singh
- Re: How to register a user? mouth
- Re: How to register a user? blackberry
- Re: How to register a user? blackberry
- Re: How to register a user? mouth
