Setting the Date in a Drop Down Menu

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ChadS
Forum Newbie
Posts: 4
Joined: Mon Jun 29, 2009 2:46 pm

Setting the Date in a Drop Down Menu

Post by ChadS »

I am writing some code that will fill 6 total menu boxes. The first 3 are for a reservation date. I have the code written to generate that dates and get the correct selected value. What I am wondering is is there a way to get the next three boxes to fill by reading 2 days from the selected date. For example, in the check in date boxes, if the selected date is June 30, 2009, I want the last three boxes to read July 2, 2009. And if the check in boxes are changed, I want the check out boxes to add 2 days to the date in the check in boxes.
BornForCode
Forum Contributor
Posts: 147
Joined: Mon Feb 11, 2008 1:56 am

Re: Setting the Date in a Drop Down Menu

Post by BornForCode »

This can be done easy, you have to use JavaScript for this (is not PHP related).
The other 3 boxes options have to be recreated based on the onchange event from the main ones.
Post Reply