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 284179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T05:26:10+00:00 2026-05-12T05:26:10+00:00

We are using the Zend Router and it seems that its overwriting the parameters

  • 0

We are using the Zend Router and it seems that its overwriting the parameters that are sent by forms. The only parameters that arrive to the controller are the params from the Url.

Does anyone know why this is happening?

Here is the config file:

; Routing config

routes.groups.route = groups/:group/:type/:idPost/:postUrl/:page
routes.groups.defaults.controller = groups
routes.groups.defaults.action = index
routes.groups.defaults.type = main
routes.groups.defaults.idPost = 
routes.groups.defaults.postUrl = 
routes.groups.defaults.page = 1

And the form:

<form action="<?= $this->_view->baseUrl ?>/groups/<?= $group['groupUrl'] ?>/deletepost/" method="post">
<input type="hidden" name="formUrl" value="<?=$formUrl ?> />
  ...
</form>

Controller:

public function deletepostAction() {
    $params = $this->getRequest()->getParams();
    print_r($params);
    die;
}

…that outputs:

Array
(
   [group] => dandy-handwriting
   [type] => deletepost
   [idPost] => 
   [controller] => groups
   [action] => index
   [postUrl] => 
   [idGroup] => 1
   [lang] => en
)

note that “formUrl” is missing, its only the parameters from the router.

  • 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-05-12T05:26:11+00:00Added an answer on May 12, 2026 at 5:26 am

    You can use the request-object in your controller to access your data.

    Fetch the request object:
    $request = $this->getRequest();

    Retrieve POST data (if your form is submitted via POST):
    $post = $request->getPost();

    Retrieve GET data (if your form is submitted via GET):
    $get = $request->getQuery();

    Retrieve parameter in the order user parameters set via setParam(), GET parameters and POST parameters:
    $params = $request->getParams();

    If you fetch your data with getParams() the params set by the router will override your POST data.

    So if you only want to fetch the data from your form, use the getPost() or getQuery() method.

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

Sidebar

Related Questions

Is anyone using Zend Navigation in conjunction with URLs that require dynamic parameters? Zend_Navigation
I m using zend. I want to define the below code outside the controller
Is it possible to create a router in Zend Framework that can match hostnames
I am using Zend Router in my project and the rule is like this;
Using Zend Framework, I've created a Model to insert a record into a database.
I've been using Zend Studio for Eclipse for about a year, and our SVN
I've been using Zend and need a search. The Zend docs aren't great so
I have recently started using Zend Studio which has reported as warning the following
I am using Zend Framework's library to manage EC2 instances and AMI. However I
I started using Zend_Paginator, it works everything fine but I noticed that there is

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.