title: Passing posted values from one controller to another in symfony
body: <p>I have two controllers. I find problem in passing posted values from one controller to another. Here is a quick view,</p>
  
  <p>This is the function 1</p>
  
  <pre><code>public function setRole(request $request){
  
  this-&gt;forward(Path,array(role=&gt;$role));
  
  this-&gt;redirect(path of second controller);
  
  }
  </code></pre>
  
  <p>This is the function 2.</p>
  
  <pre><code>public function getRole(request $request){
  
  $role = $request-&gt;get('role');//when printing this $role, I am able to get the value of $role.
  
  $sql = "select * from table where id=$role"; // I cannot get the value in this qry ,also, i cannot pass the value to a twig file
  
  return render...(filename,array('roleid'=&gt;$role));
  
  }
  </code></pre>
  
  <p>Problem is I could'n access the variable "roleid" in my twig file of second controller. Always it goes empty.</p>
  
  <p>Is there anything i have missed here?</p>