title: Control elements not by name with COM “InternetExplorer.Application” object
body: <p>I have a example page (http://<em>*</em>*.com/def.php") code is:</p>
  
  <pre><code>&lt;form action="abc.php" method="POST" name="f_action"&gt;
  &lt;input type="text" name="id"&gt;
  &lt;input type="password" name="pwd"&gt;
  &lt;input type="submit" value="OK" name="action"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>and I used php with COM “InternetExplorer.Application” object to fill and submit the form:</p>
  
  <pre><code>$Browser = new COM('InternetExplorer.Application');
  $Browserhandle = $Browser-&gt;HWND;
  $Browser-&gt;Visible = true;
  $f1_url = "http://**.com/def.php";
  $Browser-&gt;Navigate($f1_url);
  sleep(5);
  $Browser-&gt;Document-&gt;f_action-&gt;id-&gt;focus();
  $Browser-&gt;Document-&gt;f_action-&gt;id-&gt;value = $p_user_name;
  $Browser-&gt;Document-&gt;f_action-&gt;pwd-&gt;focus();
  $Browser-&gt;Document-&gt;f_action-&gt;pwd-&gt;value = $p_user_pwd;
  $Browser-&gt;Document-&gt;f_action-&gt;action-&gt;focus();
  $Browser-&gt;Document-&gt;f_action-&gt;action-&gt;click();
  </code></pre>
  
  <p>It can work and easy to use by name attribute!
  BUT if I change the part of example page code to this:</p>
  
  <pre><code>&lt;form action="abc.php" method="POST"&gt;
  </code></pre>
  
  <p>Change "name='f_action'" to "<b>NO name attribute</b>", How can I do to fill and submit the form with COM “InternetExplorer.Application” object and php?</p>
  
  <p>Thank you and sorry for my poor English.</p>