Im having some trouble writing a booking system for my site. Im using dreamweaver so the built in functions should make it easier but its not helping right now.

First of all here is my database
[IMG]http://i19.photobucket.com/albums/b178/GregHesp/Untitled-11.jpg[/IMG]


Now on my booking.php page I want have a dynamic select menu which gets the information from hotel_tbl - row 'title'

I want it so that when the user selects a hotel it shows the room sizes availble from rooms_tbl - row availble.


According to my collegues that is the easy way of doing it compared to what I had im mind.
Dropdown -> shows arrival date and departure date -> after these dates selected shows availible rooms


If anyone can help me make either of these it would be a great help. At the minute im really stuck

Thanks

i would use ajax for something like that. makes it look professional.

if you need more help pm me and i will see what i can do.

Im having some trouble writing a booking system for my site. Im using dreamweaver so the built in functions should make it easier but its not helping right now.

First of all here is my database
[IMG]http://i19.photobucket.com/albums/b178/GregHesp/Untitled-11.jpg[/IMG]


Now on my booking.php page I want have a dynamic select menu which gets the information from hotel_tbl - row 'title'

I want it so that when the user selects a hotel it shows the room sizes availble from rooms_tbl - row availble.


According to my collegues that is the easy way of doing it compared to what I had im mind.
Dropdown -> shows arrival date and departure date -> after these dates selected shows availible rooms


If anyone can help me make either of these it would be a great help. At the minute im really stuck

Thanks

Hi,
This is Vinoth from india.
First step: U must load all hotels in one combo with key - hotel id
(First value "" and lbl is <--please select-->)
Second step: Put empty combo for rooms available with <--please select-->

Third step: get the hotel id and its rooms list in one hidden variable
(
value like 1#4,7,8@2#4,5
here @ to seperate the hotels
# to seperate hotel id and its rooms
, to seperate rooms list
)

Javascript:
while onchange event ... u can get the hotel id from hotel list combo... using that id u can get the room list of that hotel from hidden value.. then load the combo from that room list

i hope this may help...

Regards,
VinothKumar.C
<snipped>

i would use ajax for something like that. makes it look professional.

if you need more help pm me and i will see what i can do.

Hi,
No need to use ajax for all things...
u can sole this thro javascript itself..... think easy - make easy

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.