PDA

View Full Version : PHP booking and concurrent user help!


puja
04-21-2006, 07:17 PM
Hi
I am tring to do a booking system for holiday accommodation and im struggling with getting the bookings to work.
I was thinking of doing a drop down box with the available dates for each type of accommodation and letting the customer choose from there once they have specified the type of accommodation they want.
Im not sure how to go about it though.
the first page i have would have the customer searching for the type of accommodation they need i.e. type, number of people and the results of that will be shown with the available dates for the results.
once i have got the bookings to work i also need to ensure that two people cant book the same accommodation for the same date at the same time.
To solve this i was going to have a flag field which will change to 1 once someone has chosen the booking and then be checked again when they try to confirm the booking.
Only if the flag is 0 they will be able to confirm it.
Im not even sure if that makes sense.
Any suggestions will be appreciated.
Thank You

goughy000
04-22-2006, 12:53 PM
about the if its 0 or 1 to be able to confirm.. thats spot on

About displaying dates available? I'd let them type their own in

puja
04-22-2006, 08:34 PM
hey
thanks for the advice on the 0 and 1
the thing with the dates is that if i allow them to choose their own, i dont know how 2 validate it or where and how i could store it in a clear format that will make sense to ppl apart from myself
i will have to ensure that the booking start date they choose is after any previous bookings that have been made and the end date is before any start dates for bookings that have already been made.
i just cant get my head around how to do that.
im already struggling with just trying to do the search function that returns the accommodation according to their requirements.:confused: