You're performing a redirect which prevents you from seeing the var_dump'ed
data. Try this:

Zend_Debug::dump($formData);
exit;

--
Hector


On Tue, Jul 6, 2010 at 8:35 AM, W Itch <
im.allergic.2.mailing.li...@gmail.com> wrote:

> How can I print_r or Zend_Debug *$formData* in my editAction?
> I want to see what values this array contains.
>
> The MVC code separation makes me confused with how to check and see the
> contents in certain variables and arrays.
> That's not created by me manually from the View part.
>
>
>
>         public function editAction()
>         {
>                 $this->view->title = "Edit album";
>                 $this->view->headTitle($this->view->title, 'PREPEND');
>
>                 $form = new Form_Album();
>                 $form->submit->setLabel('Save');
>                 $this->view->form = $form;
>
>                 if ($this->getRequest()->isPost()) {
>                         *$formData* = $this->getRequest()->getPost();
>
> //...........................................................
> *// LOOK AT ME, OVER HERE!  Testing123*
>
> //        Zend_Debug::dump($formData);
>         print_r($formData);
> //...........................................................
>
>
>                         if ($form->isValid($formData)) {
>                                 $id = (int)$form->getValue('id');
>                                 $artist = $form->getValue('artist');
>                                 $title = $form->getValue('title');
>                                 $category = $form->getValue('category');
>                                 $albums = new Model_DbTable_Albums2();
>                                 $albums->updateAlbum($id, $artist, $title,
> $category);
>
>                                 $this->_redirect('/');
>                         } else {
>                                 $form->populate($formData);
>                         }
>                 } else {
>                         $id = $this->_request->getParam('id', 0);
>                         if ($id > 0) {
>                                 $albums = new Model_DbTable_Albums2();
>                                 $form->populate($albums->getAlbum($id));
>                         }
>                 }
>         }
>

Reply via email to