【发布时间】:2017-07-24 05:23:46
【问题描述】:
感谢您查看我的问题。
我正在尝试这样做: 使用带有复选框的表单:用户单击多个复选框(针对一个问题)。 然后点击“提交” 然后一个 PHP 页面获取表单元素并将它们放入变量中。我可以对其他数据执行此操作,但不确定如何使用复选框(因为它是一个数组)。
你能帮帮我吗?
$Q1 = $_POST['Hood']; // This one is the array. Let's say it's an array that holds 3 words (red, white, blue). I'm fine if they all get stored in $Q1, I just don't know how to loop through the array (in $POST['Hood']) to get all 3 words in that one variable ($Q1)
$Q2 = $_POST['Handle'];
$Q3 = $_POST['Lever'];
所以我想我需要弄清楚如何循环遍历 $_POST['Hood'] 以便从中取出每个数组元素。请帮忙:)
感谢您的帮助!
【问题讨论】: