I have a basic form with 2 drop down boxes. One drop down box allows you to choose the year (e.g. 2007, 2008, 2009) and the other drop down box allows you to choose the month (e.g. 01, 02, 03, etc). The form, when the submit button is pressed, will go to a php url. I would like to make it so that the url is determined by the chosen month and year in the drop down boxes. For instance, if I choose 2008 for year and 09 for month, I woul dlike it to go to the following url when you press the submit button:
Hi Cedric813. If you change your form's method attribute to "get", the action address will automatically change to this when you submit your form: "index.php?yeardrop=[selected year]&monthdrop=[selected month]". If you really want to change that to "year" and "month", just change the name attributes of your select elements. Wonderfully simple, eh?
Last edited by Kryptonian; 01-01-2009 at 02:45 PM.