title: Symfony/Routing: Using POST to Avoid Query Params in URL
body: <p>I want to pass the id from one action to the next action, but I do not want it seen in the URL. Is there a way to hide it?</p>
  
  <p>Using Symfony, I have created a sign-up done page whose URL should be <code>/signup/done</code>
  When the form is processed, I want to redirect to the <code>signupSuccess</code> action and pass the recently created <code>ID</code> for future use. So I use...</p>
  
  <pre><code>$this-&gt;redirect('@signup_done?id=' . $sign_up-&gt;getId());
  </code></pre>
  
  <p>The routing is as follows:</p>
  
  <pre><code>signup_done:
    url:   /signup/done
    param: { module: SignUp, action: signupDone }
  </code></pre>
  
  <p>I have avoided the :id at the end because I don't want it in the URL. 
  But the resulting URL is <code>/signup/done?id=1</code></p>
  
  <p>Just as an experiment, I tried putting this on a template.</p>
  
  <pre><code>&lt;?php echo link_to('Sign-up again', '@signup_done?id=1', 'post=true') ?&gt;
  </code></pre>
  
  <p>Even when using post, the query parameter appears in the URL.</p>
  
  <p>The need is: I want to pass the id from one action to the next action, but I do not want it seen in the URL. Is there a way to hide it?</p>