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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:29:56+00:00 2026-05-29T07:29:56+00:00

When I click on a submit button i want the page to redirect to

  • 0

When I click on a submit button i want the page to redirect to the following page?

header('Location: /pdp/policy-info.phtml');

I wrote the above code in the controller code but I am not able to redirect to the above page. it stays on the same page.
the filename is called policy-info.phtml in the view.

Also once I redirect, would I be able access my form values through $_POST?
Or is there an alternative.

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

    ok it sounds to me like you may be missing a few concepts:

    • You will never redirect to a phtml file. (unless you have written some custom rewrite/route rules) Zend uses the MVC architecture, urls exist in this fashion:

      /module/controller/view/key1/value1/keyx/valuex/

      generally zend urls don’t terminate with file extensions. Also you will never directly call a view file from your browser.

    • In your form tag, you specify where the form submits to with the action attribute. For your url i’m assuming the pdp controller and policy-info action

        action="/pdp/policy-info/"
    
    • If you want to redirect after a form submit from with your controller you would use:
        $this->_redirect('/pdp/policy-info/'); 
    
        # maybe you want to execute some code and then execute 
        # additional code in another controller without re-bootstrapping
        $this->_forward('policy-info', 'pdp');
    

    http://framework.zend.com/manual/en/zend.controller.action.html#zend.controller.action.utilmethods

    • If you redirect you will not have access to your POST unless you saved those values elsewhere (like in your session). If you forward, I believe the values will still be available in the second action.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to submit my parent page when I click on submit button of
I have a form which I want to submit upon button click which is
The following code does not submit the input values: $('.button').live('click', function() { var date
When a user clicks a submit button I want the form to be submitted.
I have a website where I have to click a submit button on a
I click on items in my listbox and then hit a submit button, but
I want to disable the submit button when a user submits the form so
I have simple registration form. Once all information entered, user click submit button and
I have textbox1 in Default.aspx vb.net page with textbox1.text=Sumit On button click event I
I want to cause a browser redirect by changing the value of window.location in

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.