Submit form in HTML file to PHP file and display result in the same HTML
<p>I need help please. 
I create html file with 2 tabs. The first tab contains form that takes user input and performs some function. I want the result of the function to be displayed in the second tab. 
The form in first tab should submit an action to PHP script. The PHP script is inside the same HTML file. 
What should I write in action of the form? 
</p>

<p>Any help is highly appreciated.</p>

<p><strong>Edit1:</strong>
The html file is a client side and the php is a server side So, I should separate the php script and put it in a separate .php file. So, I have 2 files: ".html" and ".php".</p>

<p>HTML file:</p>

<pre><code>&lt;ul class="nav"&gt;
    &lt;li id="TAB0" class="selected"&gt;&lt;a href="#TAB0"&gt;&lt;em&gt;Run function&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li id="TAB1"&gt;&lt;a href="#TAB1"&gt;&lt;em&gt;Results&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
    &lt;li id="TAB2"&gt;&lt;a href="TAB2"&gt;&lt;em&gt;Help&lt;/em&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="content" id="CONTENT"&gt;
    &lt;!--TAB0--&gt;
           &lt;div id = "TAB0" class="active"&gt;
            &lt;div class="MainContent"&gt;
              &lt;form id='myform' enctype='multipart/form-data' name='myForm'  method='post' action="calculateResults.php"&gt;
                      SOME INPUTS HERE
                   &lt;p&gt;&lt;input type='button' name="mybut" value='Run'&gt;&lt;/p&gt;
              &lt;/form&gt;&lt;/div&gt;&lt;/div&gt;
     &lt;!--TAB1--&gt;
           DISPLAY THE RESULT HERE
     &lt;!--TAB2--&gt;
</code></pre>

<p>What is done actually with the above code is display the result in a new window. The php file is already print the output result in some texts and table.
I want when I click the button in the first tab to execute .php file and display the result in the second tab not in a new window.</p>

<p>Any help please?
Thanks, </p>