$_POST is not what I expect it to be : <p>I want to write a very simple web page. There is only one button which triggers a POST method which is called on a PHP file. But the $_POST variable in the PHP file remains empty when the button is clicked.
Here are my codes:</p>

<p>index.html:</p>

<pre><code>&lt;!doctype html&gt;
&lt;html lang="en"&gt;
    &lt;head&gt;
        &lt;script src="script.js" type="text/javascript"&gt;&lt;/script&gt;
        &lt;script src="jquery-3.4.1.min.js" type="text/javascript"&gt;&lt;/script&gt;
        &lt;meta charset="utf-8"&gt;
    &lt;/head&gt;
    &lt;body&gt;
        &lt;button type="button" onclick="mypost();"&gt;POST&lt;/button&gt;
    &lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>script.js:</p>

<pre><code>function mypost(){
  $.post("test.php","Hello World!");
}
</code></pre>

<p>test.php:</p>

<pre><code>&lt;?php
print_r ($_POST);
</code></pre>
