I'm trying to save multiple fields to a database which I've created
using the inputs() FormHelper method. However, only the first field
saves to the database. Here's the controller code:
class NamesController extends AppController {
var $name = 'Names';
function add() {
$first_name = $this->data['Name']['first_name'];
$last_name = $this->data['Name']['last_name'];
$age = $this->data['Name']['age'];
$this->set('first_name', $first_name);
$this->set('last_name', $last_name);
$this->set('age', $age);
$this->Name->save($this->data);
}
}
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---