title: POST extra values in an HTML <form>
body: <p>I have a simple form which passes the value of an <code>&lt;input /&gt;</code> element:</p>
  
  <pre><code>&lt;form action="updaterow.php" method="POST"&gt; 
      &lt;input type="text" name="price" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How can I post extra values along with the <code>&lt;input /&gt;</code> value? For example, an arbitrary string, or a variable inside the current PHP script.</p>
  
  <p>I know this is possible with GET:</p>
  
  <pre><code>&lt;form action="updaterow.php?foo=bar" method="GET"&gt;
      &lt;input type="text" name="price" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>or:</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;form action="updaterow.php?foo=&lt;?=htmlspecialchars($bar)?&gt;" method="GET"&gt;
      &lt;input type="text" name="price" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>but I need POST.</p>