Hey,
Building a hotel booking system as a college project, And as I do not want to go through the building a calendar that shows dates that are already booked, aww can be bothered.
ok the max number of days of stay allowed are 7, now I have thought of a system that will just store 2 dates in the database - bookings/room table - DateIn and DateOut.
Now I was just gawna show all the rooms in a loop with an if statement matching Booking/Room ID in with the likes of:
IF DateNow is Between DateIn and DateOut
THEN Room is Booked - room is available from COUNT days untill DateOut - LINK book from this date>
ELSE Room is available from - COUNT days untill next booking - MAX COUNT 7 - LINK Book this room>
ENDIF
Counting the days will be counting days in a full date format output.
Now I have all the theory, I have no idea how to write it LOL ... So help please :D .. or if any1 has a better way of working this sytem, I'm open for sugestions.
Thanks