Hi im a new member in this forum..

i really need your help as soon as possible, im doing my final project for graduating, its about doing a website for a hotel in jsp. i almost finished everything, now which im stock in it, and dont know how to do it is the "check availibility", how should i do it, can some body give me some ideas or codes if they already have, ill be so happy if you helped me [IMG]http://www.codingforums.com/images/smilies/smile.gif[/IMG]
i 4got 2 tell u, i use microsoft access 4 the database

Regards,
Darko

You better to explain how the system works, not just tell us how thing does not work or you not able to implement. There are many options how to do it and not everything is suitable.

ok what u want me 2 tell u??
u ask and ill answer u..

aren't you little lazy???

What your site does in details would actually help.
How the reservations are made?
How they are stored?
How they are stored?
Are there any difference in room types?
What you expect from the option "check availability"

im doing a website for a hotel.
i actually finished all the coding by jsp such as rigistration, amin page, member page, guest book.
i use microsoft access to store the information.
i did 4 tables, one for personal info: such as name, email, phone #, username, password....etc.
another table for guestbook which will sore all the information that user will enter.
another table for the hotel info which will store the information such as: arrival and departure date, room type, # of rooms childrens and adult.
for the room type i put each room type in a table. in the hotel there 4 types of rooms, each room i put it in a table, so that it will be easy to check the availability for the available room.
In the check availability, i want the user to enter the check in date, check out date and room type, then he press the check availability button andit have to check if the room is available in that date or not.

ps: i ddnt start the reservation as well, i have some difficulty in doing it.

is that info enough :)

yes, he's lazy. Doesn't even bother to write English, insists on using some sort of shorthand (probably thinking it makes him sound "kewl" or something silly).

Hi there,
Look,all u got to do is modify some information in the tables. Before coding it is important that u build a proper flow of data control and define the relationships.All u can do is:
1. In the hotel table,in the type of room table,as soon as the user reserves the room,decrement the value of the number of rooms available.
2.Define a button for the user to check for the availability of the rooms.
3.When the user clicks the button,check if the value of number of rooms is greater han zero(>0).
4.If it is greater than zero,then proceed,else give a message which displays "Sorry,these rooms have been already booked".
I would love to help u.But without looking at the complete code,it is highly impossible for me to guide u exactly where to do what. What I told is just simple if() else() statement.I hope it's clear. If u have any problem please let me know.I hope u got my point.Just define a variable (number of rooms left).As soon as that type of room is booked,decrement it(number of rooms left= number of rooms left-1).
Others,I hope I am not lazy and I hope my english is also o.k.(if not very good)....Enjoy.....

I do not argee with you alimirmd, I'm not specialist into DB's but I can see problems with your approche

Look,all u got to do is modify some information in the tables. Before coding it is important that u build a proper flow of data control and define the relationships...

1. In the hotel table,in the type of room table,as soon as the user reserves the room,decrement the value of the number of rooms available.

You talking about table modification and keeping track of number of rooms avaible for 4 different room types. Where do you want to keep them and why? Also some rooms can be available in certain time period but booked for another. You better run query with given type of room and time period to check avaibility that will return exact room numbers avaible.

2.Define a button for the user to check for the availability of the rooms.
3.When the user clicks the button,check if the value of number of rooms is greater han zero(>0).
4.If it is greater than zero,then proceed,else give a message which displays "Sorry,these rooms have been already booked".

Complitely irrelevant as

  • there have to be some sort of triger to send request for room check (so it will be button)
  • request can return numerous responces depending what you request and it is up to you what you will present to user
  • error message will be just one possible outcome of query

So saasbs, I recommend that you re-do your tables as in present state they do not represent work of final year student but beginners attempt. You just hastly put together the simplest part of your booking system but halted facing more significant problem. You may disagree with me, but that is your choise. Think again about your database arangement, reconsider what data you want from user, what data should be held in reservation etc. Think how reservation info can help with your check avaibility function

ok what u want me 2 tell u??
u ask and ill answer u..

actually i need ur whole project which u made on hotel through jsp
plz if u can mail me on my id <snipped>

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.