Advertisement
Guest User

Untitled

a guest
Apr 18th, 2012
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. $form = new Application_Form_Comment();
  2. $form->submit->setLabel('Comment');
  3. if ($this->getRequest()->isPost()) {
  4. $formData = $this->getRequest()->getPost();
  5. if ($form->isValid($formData)) {
  6. $comment = new Application_Model_DbTable_Comments();
  7. $comment->addComment($formData['comment'], $id);
  8. $this->_helper->redirector('index');
  9. } else {
  10. $form->populate($formData);
  11. }
  12. $this->view->form = $form;
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement