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

  • Home
  • SEARCH
  • 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 512711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:20:52+00:00 2026-05-13T07:20:52+00:00

I an redirection (in some cases) from a controller to the error controller, action

  • 0

I an redirection (in some cases) from a controller to the error controller, action ‘not-logged-in’ using the redirector helper. My problem is the following: I want to pass an argument in the $_POST array (an URL from where the redirection happened) so the user will be able to return to that page after performing a login.

How can i place data in the $_POST array while using redirect helper?

Thank you ahead.

  • 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-13T07:20:52+00:00Added an answer on May 13, 2026 at 7:20 am

    When you use the redirector with an internal redirect (ie. goToRoute) the paramters are passed along with it. Thus if you add your refferrer to the the request before you actually redirect:

    // Assuming $request is a Zend_Controller_Request
    $request->setParam('ref', $referrer);
    // then use the redirector
    

    then that variable will be passed along with the request upon redirect. So then you would need to check for/grab that variable from the request in the action youve redirected to and then set it as a hidden field in the form. Then when your form posts to your login action you can check again for a ref variable and on successful login redirect to that location.

    Now if i were you i would not actually use the referral as the url but a serialized or json encoded array of the previous request’s parameters. that way you can use goToRoute in this second instance as well.

    Ofcourse if the redirection came form some sort of post action that contained sensitive data you wouldnt want to do this. In that case you would want to use the session as has been previously suggested.

    Above all the best advice i can give is to look at the code of Zend_Controller_Router_Rewrite and Zend_Controller_Action_Helper_Redirector.

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

Sidebar

Ask A Question

Stats

  • Questions 254k
  • Answers 254k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Try IndexOf(@"\") or IndexOf("\\"). May 13, 2026 at 10:13 am
  • Editorial Team
    Editorial Team added an answer I tried to do something similar sometime ago, but eventually… May 13, 2026 at 10:13 am
  • Editorial Team
    Editorial Team added an answer I created a custom unhanded exception module, which allowed retrieval… May 13, 2026 at 10:13 am

Related Questions

I'm currently working on the user registration in my project. After the registration is
I have an MDI app written in Qt. Some of the subwindows include QGLWidget
I'm trying to play around with netcat to learn more about how HTTP works.
I'm wondering how one would go about redirecting the stdin of a script from
I have a Perl script that does a fork/exec to start another tool in

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.