-
1. Re: Coding a Calendar to Show What Days an Item Has Been Booked
Rob Hecker2 Jul 22, 2014 4:11 PM (in response to Max Resnikoff)OK. I do a lot of work in PHP with scheduling appointments, booking rooms, etc. On the one hand, PHP has a really great dateTime class for performing all kinds of actions with dates and times, but I think your project would get you into some moderately advanced database and PHP work.
This would also require working with multi-level arrays. For each date cell to be click-able and return the info for the booking on that date (or date range) then the calendar array must be populated with the relevant data from the database.
If you wrote your own inventory system from scratch (meaning also that Dreamweaver didn't write the data bindings) then you may be up for such a project.
If you do go down this road, then get off on the right foot by storing dates in the database as dates (2014-07-22), never as text. Remember that humans, LINUX, and MySQL each use a different format for dates. Also, in PHP, dates should be worked with as dates, not strings. Don't use the PHP date functions. Use the dateTime class instead.
-
2. Re: Coding a Calendar to Show What Days an Item Has Been Booked
Max Resnikoff Jul 22, 2014 4:15 PM (in response to Rob Hecker2)Hi,
Thank you for your response.
Dreamweaver did all the bindings for me.
Do you think there is an easier way to go about this?
I don't have much time, and I am stuck on this.
Maybe not have a calendar. How would I go about letting the user know if the item is available when they are booking something?
Thank you for your help!
-
3. Re: Coding a Calendar to Show What Days an Item Has Been Booked
Rob Hecker2 Jul 22, 2014 4:28 PM (in response to Max Resnikoff)It would certainly be easier to code if you don't show the info on a calendar; however, people really like that visual way of getting info.
You could go at it from the opposite direction, have people enter the dates, then you check the database for a match. For that purpose you can use the nice little jquery calendar widget as a way of inputting their date data.


