Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think this might cover the basics of what you want:</p> <pre><code>&lt;?php class IndexController extends Zend_Controller_Action { public function init() { } public function indexAction() { //set form action to indexController nextAction $form = My_Form(); $form-&gt;setAction('/index/next'); //asign form to view $this-&gt;view-&gt;form = $form; } public function nextAction() { //if form is posted and valid if ($this-&gt;getRequest()-&gt;isPost()) { if ($form-&gt;isValid($this-&gt;getRequest()-&gt;getPost())) { $data = $form-&gt;getValues(); //Do some stuff } } else { //if form not posted go to form in indexAction $this-&gt;_forward('index'); } } } </code></pre> <p>it seems as though this the form of your question, but what you really want to know is how send post data in a redirect instead of get data, if I'm on the right track please comment on how else we can change this to help you solve your problem.</p> <pre><code>public function indexAction() { $client = new Zend_Http_Client('http://localhost/test/test.php'); $client-&gt;setParameterPost(array('user' =&gt; 'dinuka')); $client-&gt;setConfig(array('strictredirects' =&gt; true)); $response = $client-&gt;request(Zend_Http_Client::POST); } </code></pre> <p>I get the idea that what you want with this piece of code is to submit a post request to this url and to redirect your browser there at the same time.<br /> This should be possible and according to what I can find it is supposed to be as simple as <code>$response-&gt;location</code> but I can't make it work. <code>-&gt;location</code> is supposed to be a header element but I can't find it. Maybe one of our other gurus can help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload