I know this has been posted about before, but the answer has always
been obscure.
My controller:
<?php
class OrdersController extends AppController
{
var $name = 'Orders';
var $components = array('Ssl');
var $helpers = array('Html','Javascript','Ajax','Time','Form');
function stepOne() {
$this->Ssl->force();
$this->set('data',$this->Session->read('Order'));
if (!empty($this->data)){
$this->Order->Member->set('id',$this->Session->read('Member.id'));
$this->Order->Member->save($this->data);
/* I update session data here */
//$this->redirect('stepTwo');
}
}
}
?>
The name of each item in the form is data[Order][Member][fieldname]
I did it this way to match the idea of the associations. Namely $this-
>Order->Member->save();
I wasn't sure if this was necessary...
The data is being updated in the session but not in the DB. No
validation errors (I think I have heard that this always happens? I am
not sure).
Thanks for the help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" 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
-~----------~----~----~----~------~----~------~--~---