title: Login to site using idhttp
body: <p>I am trying to login to a website via delphi / indy. Currently all I have is a button (used to send a password / username) it calls this procedure.</p>
  
  <pre><code>procedure TForm5.Login(name: string; Pass: string);
  var
  UserID :string;
  Password :string;
  res :TStringStream;
  details :Tstringlist;
  multiformupload: TIdMultiPartFormDataStream;
  begin
  //create ini file to hold password / usesr name
          UserID:=name;
          Password:=pass;
  
          Res  := TStringStream.Create();
          MultiFormUpload := TIdMultiPartFormDataStream.Create;
  
          MultiFormUpload.AddFormField('user',UserID);
          MultiformUpload.AddFormField('pass',Password);
          idhttp1.Request.ContentType := '8bit';
          //idhttp1.Get('http://codeelf.com',res);
          idhttp1.Post('http://codeelf.com/games/the-grid-2/grid',Multiformupload,res);
          memo1.Lines.LoadFromStream(res);
  
          res.Free;
  end;
  </code></pre>
  
  <p>When I look at the site code, i have this.</p>
  
  <pre><code> &lt;form id="gridForm" action="" method="post" onsubmit="return checkLoginForm()"&gt;
        &lt;table align="left" border="0" cellspacing="2" cellpadding="2"&gt;
           &lt;tr&gt;
              &lt;td align="left" id="my_username"&gt;Username:&lt;/td&gt;
              &lt;td align="right"&gt;&lt;input type="text" id="user" name="user" maxlength="12" autocomplete="off" /&gt;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
              &lt;td align="left" id="my_password"&gt;Password:&lt;/td&gt;
              &lt;td align="right"&gt;&lt;input type="password" id="pass" name="pass" maxlength="20" /&gt;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
              &lt;td colspan="2" align="right"&gt;
                &amp;nbsp;&lt;/td&gt;
           &lt;/tr&gt;
           &lt;tr&gt;
              &lt;td colspan="2" align="right"&gt;
                 &lt;input id="submission" type="submit" class="button" name="sublogin" value="Login" /&gt;&lt;/td&gt;
           &lt;/tr&gt;
  </code></pre>
  
  <p>So the submission button value is just login. Thus i dont know where to POST the data. How can i find this out? And once i do find out the url, I should just be able to add it to the <code>idhttp1.Post</code> correct?</p>