html dropdown form post to php
forms, html, php, post
Solution
Form elements require a `NAME` attribute in order to be posted. You have an `ID` instead.
Problem
I have a strange error with my form. I always get a Daily selection with a date of 01 Jan 2000. The code for the form is this: ``` <!DOCTYPE html> <html> <body> <form name="mainForm" action="ReportForm.php" method="post"> How Often to Generate Report: <select id="period" onchange="Change(this);"> <option selected="selected" value="0">Daily</option> <option value="1">Weekly</option> <option value="2">Monthly</option> </select> <br /> <input type="submit" title="Submit"/> </form> </body> </html> ``` There are 3 more dropdowns like this for month, day, and year. I might have guessed that the selected="selected" had something to do with it, but the year 2000 is not an option. The default values for theses are January, 1, and 2012. I am thoroughly confused by this, and would appreciate any help. The PHP associated with this is: ``` <?php require "Search.php"; require "Schedule.php"; Schedule( $_POST['period'], mktime(23, 59, 59, $_POST['month'], $_POST['day'], $_POST['year']) ); Search( "param1", "param2", "param3", "test@testing.com" ); exit(); ?> ``` Thanks, -rusty