PHP <form action = 'XXX.php' method = 'post'> var_dump($_POST) is null?
<p>this is form code:</p>

<pre><code>&lt;div class="login_cont"&gt;
&lt;form action="doLogin.php" method="post"&gt;
        &lt;ul class="login"&gt;
            &lt;li class="l_tit"&gt;管理员帐号&lt;/li&gt;
            &lt;li class="mb_10"&gt;&lt;input type="text"  name="username" placeholder="请输入管理员帐号"class="login_input user_icon"&gt;&lt;/li&gt;
            &lt;li class="l_tit"&gt;密码&lt;/li&gt;
            &lt;li class="mb_10"&gt;&lt;input type="password"  name="password" class="login_input password_icon"&gt;&lt;/li&gt;
            &lt;li class="l_tit"&gt;验证码&lt;/li&gt;
            &lt;li class="mb_10"&gt;&lt;input type="text"  name="verify" class="login_input password_icon"&gt;&lt;/li&gt;
            &lt;img src="getVerify.php" alt="" /&gt;
            &lt;li class="autoLogin"&gt;&lt;input type="checkbox" id="a1" class="checked" name="autoFlag" value="1"&gt;&lt;label for="a1"&gt;自动登陆(一周内自动登陆)&lt;/label&gt;&lt;/li&gt;
            &lt;li&gt;&lt;input type="submit" value="" class="login_btn"&gt;&lt;/li&gt;
        &lt;/ul&gt;
    &lt;/form&gt;
&lt;/div&gt;
</code></pre>

<p>this is doLogin.php</p>

<pre><code>include_once '../include.php';

$username = $_POST['username'];
$password = md5($_POST['password']);
$verify = $_POST['verify'];
$session_verify = $_SESSION['verify'];
print_r($_POST);
var_dump($_SERVER);
</code></pre>

<p>this is var_dump($_SERVER) result
<a href="https://i.stack.imgur.com/gjUJB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gjUJB.jpg" alt="enter image description here"></a></p>

<p>why var_dump($_POST) is null?</p>