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