ThreesixtydegreeTechReview
My Problem is, I want to create new entry for both
ThreesixtydegreeFeedback & ThreesixtydegreeTechReview in the 'add'
view of ThreesixtydegreeTechReview. There is no associations between
these models..
In the 'add' View of ThreesixtydegreeTechReview, I m not able to
create a new data for ThreesixtydegreeFeedback Model.
Please Help me. I am very new to cakePHP..
Controller of ThreesixtydegreeTechReview:
function add(){
$this->loadmodel('ThreesixtydegreeFeedback');
$this->set('feedbacks', $feedbck);
if (!empty($this->data)) {
$this->ThreesixtydegreeTechReview->create();
if ($this->ThreesixtydegreeTechReview->save($this->data)) {
$this->Session->setFlash(__('The
ThreesixtydegreeTechReview has beeeen saved', true)); debug($this-
>data);
// $this->redirect(array('action'=>'index'));
} else {
$this->Session->setFlash(__('The
ThreesixtydegreeTechReview could not be saved. Please, try again.',
true));
}
$this->ThreesixtydegreeFeedback->create();
if ($this->ThreesixtydegreeFeedback->save($this->data)) {
$this->Session->setFlash(__('The ThreesixtydegreeFeedback
has been saved', true));
// $this->redirect(array('action'=>'index'));
} else {
$this->Session->setFlash(__('The ThreesixtydegreeFeedback
could not be saved. Please, try again.', true));
}
}
}
Am i doing right? Please guide me..
Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
No comments:
Post a Comment