1
谢谢你看我的问题。将表单中的复选框数组传递给PHP变量
我试图做到这一点: 使用复选框的形式:用户点击几个复选框(对于一个问题)。 然后点击“提交” 然后一个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 [“罩”]循环才能得到每个数组元素出来。请帮忙:)
谢谢您的协助!
太好了,我现在就试试吧! – Andrea
完美运作。非常感谢! – Andrea