Free PHP Booking Slots Calendar

May 25th, 2014

This is the second and latest version of my PHP Booking Slots Calendar.
I got so many emails requesting new features and this version contains the following:

  • Set the starting and ending slot times
  • Set as many slots her hour as you need
  • Set the cost per slot
  • Recognises part booked, fully booked, and past dates
  • Set a closed day(s) when no bookings can be made
  • Set alternative currencies
  • Leap year safe

After a booking is made, a user ends up at the book_slots.php page.
This is the page which actually books the slots. I left this page deliberately sparse so that you can integrate it with your own basket or redirect the user to a payment gateway.
Check out the live demo here.

Compatability

The PHP Booking Slots Calendar works with IE7+, Ipad, Chrome and Firefox.
Older browsers may struggle to correctly display the “Make Booking” button because it uses CSS3.

PHP Free Booking Slots Calendar

Features

When a checkbox is clicked, the basket section shows the current total cost and selected slots. The cost and slots are recalculated every time a slot is clicked.

Selected Slots

Setting up the calendar

All you need is a MySQL database and connection details, and the ability to upload files to your server.
I have included calendar_table_schema.sql file which you can use to import directly into phpMyAdmin. Your “bookings” table should look like this:

MySQL bookings schema

Free to use, let me know how you get on, I’d like to hear from you.

Download PHP Booking Slots Calendar

Click here to download PHP Booking Slots Calendar

  • William

    Thank you sooo much for your work on this booking calendar and for allowing others to use it. Is there a way to only allow a person to book one time slot per day?

  • steve

    Hi there,

    Great script. Where would I insert this code to have the email sent to me?
    I tried inserting it in a couple of places to no avail.
    Thanks

  • Joe

    Hi sir,

    Great work sir. Can i ask something. If i want to make booking slot for multiple rooms and i want to create a dropdown list to choose the specific room.How i can retrieve the value and then parse the value by inserting to the sql. I’m new in php and Object Oriented so it kind difficult. Can you give some help here sir. sorry for my poor english.

    • Pramudith Thenabadu

      I have the same question multiple bookings per same slot…

  • markzipps

    Is it possible to change the code slightly to allow for a 24hr booking for two times of day. For example, 10am to 10am and 5pm to 5pm. I can get away with the single time by having one start time and adding 1440 minutes to the booking frequency. It would also need to store a booked slot for the following day if the 5pm slot was taken. Does this make sense?

  • sohail

    Hi, I am getting error message: “Fatal error: Call to undefined method booking_diary::after_post()” when I log into a calendar page. How can I fix this? Thanks

  • vinod kumar

    Thank you very much….its awesome

  • kaushik

    hi planetphp,
    i have just completed my UG in CSE, I also want to develop some applications in PHP.
    since Im not familiar with php i seeked the help of internet and found some applications and decided to develop by myself but i found it difficult. So my question is how long practice will i require to become a professional. i know my question is bit weird

    • Planetphp

      Not an easy question to answer… I’d learn some HTML and some basic Javascript before learning PHP. Learning a programming language can easily turn into an obsession and eat up all your time… I would google “Code Academy” if you are new to programming. It’s a great place to start. Good luck!

  • kaushik

    why im getting a blank screen
    someboby pls help me

  • Jan Robinson Murby

    hi hun im look at also putting a date picker in which file did you put it in hun x

  • Pramudith Thenabadu

    Great script, thanks..
    Question: what if i want to make 2 bookings available per each slot.. how do i do it?

  • Pramudith Thenabadu

    same question… how do i d o it??

  • Ian

    Hi

    Can this handle multiple bookings as well as different prices, for example if a event is on a Wednesday it is £10 and if a event is on a Thursday it is £7.50

    Also can PayPal be integrated into it as well and also can discounts be put into it

  • Clayton Rossiter

    Hi PlanetPHP,
    Downloaded your file and think it looks great! However, rather than booking time slots, I’m looking to produce a booking form for a guest house, so rather than booking time slots, I want it to display which nights people would like to stay. Is there a quick way to bypass the requirement of choosing time slots and choose dates instead?
    Many thanks

  • Rene

    How I can make the calendar in Spanish language?