Forum Moderators: coopster

Message Too Old, No Replies

Creating a Golf Tee Time Reservation Page

         

joe1182

7:41 pm on Jun 6, 2006 (gmt 0)

10+ Year Member



I am wanting to create a tee time reservation page but, am not quite sure how to go about it. I am hoping I can get some tips. I would create a DB named 2006 within that would be tables for Jan, Feb.... etc. Within each month would be columns for "NAME" "# of Players" plus "date" & "time" The field "DATE" & "Time" would already be in the database but, I don't know how they will get there. Before entering their tee time they would be able to view all of the tee times for that day. Which would be a view of the database. They could then select the time they want and then enter their information and post it to the database. Would I just upload the "Date" & "Time" manually through a text file? Does anyone have any tips for me? Maybe a quick way to do this? Thanks

eelixduppy

8:19 pm on Jun 6, 2006 (gmt 0)



There are many threads available in our Library [webmasterworld.com] and at this forum. Here are just a few to look at to get yourself familiar with how everything should be put together, at least with the MySQL aspect of it ;)
*Developing MySQL search query [webmasterworld.com]
*Commonly used MySQL Commands [webmasterworld.com]
*Basics of extracting data from MySQL [webmasterworld.com]

>>>Would I just upload the "Date" & "Time" manually through a text file?
As for this, you definitely would not do this manually--that is the work of the computer. PHP comes with nice Date/Time Functions [us2.php.net].

Basically here are the steps you want to take:
1) Retrieve information for the current day (getting the date using PHP ;)) from the database. Example query: SELECT * from 2006 where date = NOW();
2) Print this information to the browser, and at the end, have a submit button that allows someone to book a time for that day.
3)At this point, you have to program what will happen after they hit the submit button, which it will most likely go to another processing page where the time can be reserved. This page will first verify that the reserve button wasn't pushed (more on that in a sec), and then will display a form allowing the user to book a time. I would use a drop-down menu for this. You may also want to require the user to login at one point in this ordeal.
4)After the user submits the reserve form via the "reserve button" (i told you one sec ;)), the script will then check to see if the time hasn't been taken already, and if it isn't taken, then it will add the information to the database. If it is taken, then it will let the user know so.

Umm...well..that's pretty much it...I haven't reread what i just wrote so there may be some errors. I wish you luck!