"Edward Peloke" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I am currently working on a site for a vacation rental company. They want > the ability to show users the availability of certain properties. The > availability will be held in a mysql db so I assume I will have to > dynamically build a small javascript menu or something....I am just looking > for some good suggestions and examples from other's who have done this. > > I am not a fan of generating javascript from php. > > Thanks, > Eddie
Hi Eddie, there is a great calendar package in PEAR: http://pear.php.net/package/Calendar There is a good example of how to build an HTML calendar from it: http://pear.php.net/manual/en/package.datetime.calendar.intro-inahurry.php (scroll down to the middle of the page) I don't know why you want to use javascript here. I would do it this way: - select all dates of free vacation properties of the given/current month - put the dates from the DB result into an array - create the calendar with the example from above and check for every day if there is an entry for the day in your array - if so give the table cell a specific color and/or link to page containing detailed information - otherwise blank the cell out or whatever Hope this helps! Regards, Torsten -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php