title: PHP Simple Html Dom parsing a php form
body: <p>I have this php page:</p>
  <pre><code>exercice_submit.php?exerciseId=7
  </code></pre>
  <p>Which has several nested div inside</p>
  <pre><code>&lt;div id=&quot;container&quot;&gt;
  &lt;div id=&quot;content&quot;&gt;
  &lt;div id=&quot;content_main&quot;&gt;
  </code></pre>
  <p>Inside last div there is a form:</p>
  <pre><code>&lt;form action=&quot;/modules/exercice/exercice_submit.php&quot; method=&quot;post&quot;&gt;
  </code></pre>
  <p>I want to cut all the other html tags and keep only what is included inside form.
  Can you please help me parse this page?</p>
  <p>What I used is PHP Simple HTML DOM and I wrote:</p>
  <pre><code>    // example of how to use basic selector to retrieve HTML contents
      include('../simple_html_dom.php');
      
      // get DOM from URL or file
      $html = file_get_html('exercice/exercice_submit.php');
      
      echo $html-&gt;find(&quot;#content_main&quot;,0);
      echo $html-&gt;outertext
      
      ?&gt;
  </code></pre>
  <p>This doesn't seem to work. If you can help me maybe you know a way of changing submit button target to submit to different php than what it is.</p>
  <p>Thanks in advance for all potential answers.</p>