문제

I'm trying to create a PHP booking system, where customers can go into the system, select a date/time from available slots in a calendar-like interface.

I need to figure out a way to use jQuery or some other convention to pull the available time slots and put them into a drop-down menu so the user can select one and book it. The time slot selected would then go into the MySQL database as being booked. Any clues as to where I could get information on doing this? Any ideas from anyone who has done something similar?

도움이 되었습니까?

해결책

I think you need an Ajax request.

Ajax stands for Asynchronous Javascript and XML, but it can convert the response of the page to a JSON as well.

There are some libraries in Javascript that ease the use of this technique, like jQuery.

You could pull the data from an php page asynchronously (i.e., without blocking the page) and display it for the user. You can find many exemples like these among the internet.

The jQuery documentation on Ajax is here: http://api.jquery.com/category/ajax/

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top