I have a drop down input form. I want the selection to be put into an array, and then sent to another page to be displayed. But for some reason, it is not printing.
Let me show you my code so that you can get a better understanding.
Here's what my drop down input form looks like
<label>Start Month:</label>
<select>
<option name="sMonth[]" value="Jan">Jan</option>
<option name="sMonth[]" value="Feb">Feb</option>
<option name="sMonth[]" value="March">March</option>
<option name="sMonth[]" value="April">April</option>
<option name="sMonth[]" value="May">May</option>
<option name="sMonth[]" value="June">June</option>
<option name="sMonth[]" value="July">July</option>
<option name="sMonth[]" value="Aug">Aug</option>
<option name="sMonth[]" value="Sept">Sept</option>
<option name="sMonth[]" value="Oct">Oct</option>
<option name="sMonth[]" value="Nov">Nov</option>
<option name="sMonth[]" value="Dec">Dec</option>
</select>
On the NEXT php page:
<?php $sMonth=$_POST['sMonth']; // start month ?>
<?php echo $sMonth[0]; ?>
But it doesn't print anything.
NOTE = I'm aware that from the drop down menu, the selection will be put into the 1st elemental position of the array. I want to print the first element. If I can print the first element, I will be able to print the rest of the elements.