我正在尝试为用户注册页面创建一个表单,但是当我提交表单时,我一直在获取一个空白数组。当我将method="post"
切换为method="get"
时,数组中填充了适当的值。我不知道发生了什么事!
的index.html
<form action="config.php" method="POST">
<input type="text" name="firstname" placeholder="First Name">
<input type="text" name="lastname" placeholder="Last Name">
<input type="text" name="email" placeholder="Email">
<div class="select">
<select name="status">
<option selected="selected" disabled='disabled'>Status</option>
<option value="student">Student</option>
<option value="faculty">Faculty</option>
<option value="alumni">Alumni</option>
</select>
</div>
<div style="text-align: center">
<input type="submit" name="submit" value="Sign Up" class="btn large color wow center fadeInLeft">
</div>
</form>
的config.php
print_r($_POST);
结果
Array()