title: Delphi 7 TIdHttp post a form with variable fields
body: <p>I need help with a school related question.</p>
  
  <p>This was on last year's test but I lost the answers and it has been a busy year and I don't remember jack since we're not using Delphi anymore.</p>
  
  <p>We have this web form:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="action" id="id" method="post"&gt;
  
      &lt;input type="text" name="var_name_1" value="var_value_1"/&gt;
      &lt;input type="text" name="var_name_2" value="var_value_2"/&gt;
  
      &lt;input type="text" name="constant_name" value="constant_value" /&gt;
      &lt;input type="submit" name="button" value="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><code>var_name_1</code>, <code>var_name_2</code>, <code>var_value_1</code> and <code>var_value_2</code> are four different field names and values and they change every time the page is requested, for example they can be like this</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" name="12345" value="566"/&gt;
  &lt;input type="text" name="1222" value="4444abcd"/&gt;
  </code></pre>
  
  <p>Then if you request the page again they will like this</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;input type="text" name="666" value="123456789"/&gt;
  &lt;input type="text" name="XXXLUKEXXX" value="A is the first letter"/&gt;
  </code></pre>
  
  <p>I'm sure you got it, I just had to clarify some more. </p>
  
  <p>I remember how to Post using Indy components (I think):</p>
  
  <pre><code>c := tidhttp.Create(self);
  p := tstringlist.Create;
  
  p.Add('var_name_1=var_value_1');
  p.Add('var_name_2=var_value_2');
  p.Add('constant_name=constant_value');
  p.Add('button=submit');
  
  result := c .Post('http://www.test.com',p);
  
  p.Free;
  c.Free;
  </code></pre>
  
  <p>But I don't know how to get those random field names and values. Especially that they change. I know how to do this with a <code>TWebBrowser</code> but I need the Indy version because we moved to raw sockets.</p>