So here is my problem i am trying to have the form post a selected months index number +1 so i can return the month number to the input form?? Im pretty much a noob so as easy as possible explanation would be cool
<?php $monthName = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"); function monthlist($monthName){ global $monthName; foreach ($monthName as $index => $month) { echo "" .$month.""; } if (isset($_POST['monthForm'])){ $monthpick= $index+1; echo $monthpick; $_POST['monthNumber'];} } ?>Select a month: <?php echo monthlist();?>
<p>
<input type="submit" value="What is the number for the month you selected?" name="submit" />
</p>
<p>You selected: <input type="text" id="monthNumber" name="monthNumber" /> </p>
</form>