Magento 1.9 – Get Post Data from Contact Form in a View

magento-1.9post-data

I'm trying to get a success message on the contact page. When the form is send i want to show the message. So i need the post data from the form. I tried this:

$postdata = Mage::app()->getFrontController()->getRequest()->getPost('email');

And

$postdata = $this->getRequest()->getPost('email');

And

$postdata = $this->getRequest()->getParams();

But i don't get the post data

I want to display a success message, i thought that when i have the post data in the view i can make a if statment in the view to show the success message

Best Answer

This sounds like the formular is send to actionA, which redirects to actionB and you try to get the data in actionB, this is not possible. You need to save them somewhere, e.g. in the session.