Advertisement
Guest User

Untitled

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