Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8388805
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T18:33:07+00:00 2026-06-09T18:33:07+00:00

Greets. {{Solved}} In order to get POST data you MUST use $this->formHidden in order

  • 0

Greets.
{{Solved}}
In order to get POST data you MUST use $this->formHidden in order to hold all the data. Even though variables are inside the they don’t get passed if they aren’t in some sort of form item.

I am unable to access post data in ZEND.

Path of User –
START
INDEX PAGE
->Submit Page
->Pay Page

I created a controller, extended the Zend Controller, and added an action called payAction. The user can go from the Index Page to the Submit Page. After I have all their data inside variables, I used a form and a submit button to go to the “pay page”. However, I cannot get any of the POST data.

public function payAction()
{
 $data = $this->getRequest();
}

I have tried putting getRequest, getParam, getRawBody inside that controller function.
In the page itself I have tried.

echo 'Hello';
   echo $request;
   echo $data;
   echo $_POST['payZip'];
   echo $_POST['data'];
   echo $_POST[$data];
   echo $request;
   echo $this->values['payZip'];
   echo $payZip;
   echo $this->values['shippingDone'];
   echo $stuff;

Is there ANYTHING I can place in my controller or in my view in order to get my post data? I used a form method=”post” and a button and it DOES allow me to get to the page. I can see Hello. But NONE of the post data is available.

Any assistance would be appreciated.

Thank you.

— Update

    $data = $this->getRequest();
    $param = $this->_request->getParam('payZip');

    if($this->getRequest()->isPost())
    {
    print_r($this->_getAllParams());
    echo $param;
    }

Doing that gives me –
HelloArray ( [controller] => wheel [action] => pay [module] => default [shipping] => UPS Ground [payPal] => Secure Payment System )

But I still can’t print payZip… I did echo and nothing comes out.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T18:33:08+00:00Added an answer on June 9, 2026 at 6:33 pm

    To get parameters from Zend Framework you need to do this in the Action Controller:

    $data = $this->_request->getParams();
    

    You can also get individual params like this

    $param = $this->_request->getParam('payZip');
    

    What it appears your doing wrong is you’re only getting the “request object”. You need to then call that objects method to get the request data.

    Here’s some simple code I often use when testing parameters:

    public function indexAction()
    {
        #::DEBUG:: 
        echo '<pre>'; print_r($this->_request->getParams()); echo '</pre>';
        #::DEBUG:: 
    }
    

    This will show all your parameters. What you will notice is that you will also get the names of the Module, Controller and Action with your params.

    EDIT

    Ps. If you’re trying to use the parameter in the view script you need to do this:

    echo $this->data['payZip'];
    
    echo $this->param;
    

    In your Action Controller, you save your data to the “view” object by doing this:

    $this->view->myVariable = 'Hello';
    

    But when you’re in a view script, you are IN the view script, so $this represents $this->view from the action controller.

    So, you access the variable like this:

    echo $this->myVariable;
    

    Wrapping everything into a bigger code chunk for understanding:

    Your Controller

    public function indexAction()
    {
        // get all parameters and pass them to the view
        $this->view->params = $this->_request->getParams();
        // get an individual parameter and pass it to the view
        $this->view->payZip = $this->_request->getParam('payZip');
    }
    

    Your View Script

    <!-- Dump all parameters -->
    <pre><?php print_r($this->params); ?></pre>
    <!-- Print payZip -->
    <p>My PayZip is: <?php echo $this->payZip; ?></p>
    <!-- Print payZip from full parameter array -->
    <p>My PayZip (array) is: <?php echo $this->data['payZip']; ?></p>
    

    I hope that helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greets, When working with DirectX, you get this nice header to #include called DxErr9.h
Greets, Made some app on android. I for the life of me can't get
I have the following data: A post called Hello has categories greet Another post
Greets to all! I want to describe each kind of product by a class:
Greets. I realize this might be seen as a duplicate question as this but
Hey guys, sorry for this probably fairly simple question but I'm starting to get
Greets all around I'm Studying html5 I Understand the need for Remy's html5 shiv
Greets. So, I'm running Fedora Core 8 on an Amazon EC2. I installed httpd,
Greets, Does anyone how I go about detecting when a user presses on a
Greets- We gots a few nutters in work who enjoy using while(true) { //Code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.