具有多个值和相同名称的复选框返回NULL值

时间:2018-06-09 11:12:52

标签: php html checkbox

这是我的表格:

<form action="form.php?user_id=1" method="POST">
  man utd group <input type='checkbox' name='groups_hash_value[]' value='2147483647'>
  <span style='font-size:50%;'>SMS and Email</span>
  arsenal fixtures <input type='checkbox' name='groups_hash_value[]' value='9'>
  <br>
  <br> 
  Firstname:
  <br>
  <input type="text" name="firstname" value="d">
  <br> 
  Surname:
  <br>
  <input type="text" name="surname" value="burke">
  <br> 
  Mobile Number:
  <br>
  <input type="text" name="telephone" value="080">
  <br> 
  Email:
  <br>
  <input type="text" name="email" value="dara@gmail.com">
  <br>

  <p style="font-size:10px;">
  Your info will not be sold, traded or given away 
  <br> 
  Brought to you by the <a href="http://www.{website_name}">web marketing</a> company <a href="http://www.">{website_name}</a>
  <br>
  </p>
  <input type="submit" value="Submit">
</form>

当我选中两个复选框然后我var_dump($_POST)

时,这会给我一个空值

0 个答案:

没有答案