Hello,
I have a HTML form with a variable number of select fields. Each select field represents the same category, so I named all the selects like mySelect[]
. The code I wrote for getting the values is bellow:
for ($i = 0; $i < count($_POST['mySelect']); $i++) {
echo $_POST['mySelect'][$i];
}
But I don't get any results. What is wrong?
Thanks.