PHP Booking Slots Calendar

May 21st, 2012

This is the old version Calendar.
Try the new Free PHP Booking Slots Calendar

I wrote this PHP Booking Calendar for a client who wanted to be able to book appointments online.
I like BIG calendars, but found that most of the commercial products were just too small. You can change the amount of slots per hour, as well as the starting and ending times. Free to use, let me know how you get on, I’d like to hear from you.

PHP Booking Slots Calendar

All you need is a MySQL database and connection details, and the ability to upload files to your server.
Check out the live demo here.

PHP Booking Calendar

Features:

  • Move backwards and forwards to any month
  • Set any frequency of slots per hour
  • Set the starting and ending times
  • Recognises part booked, fully booked, and past dates
  • Leap year safe

Download PHP Booking Slots Calendar

Click here to download PHP Booking Slots Calendar

  • http://www.facebook.com/danpocock Daniel Pocock

    Hi, im trying to embed your calendar into a photography website to send a form with the details in it to the owner, I have managed to add in the function to send the email but I can’t seem to extract the date and time of the booking to add into the email. My knowledge of php is fairly basic but i can usually read the code and find what i’m after but i’m struggling reading your code :-/ could you point me in the right direction. thanks

  • monkey64

    Daniel. When a booking is made, the posted value $_POST['booking_time'] will give you the time of the booking. The variables: $month, $day, $year are posted back to calendar.php after a booking is made. To send an email, you could add code to the function “after_post” within class_calendar.php, since all the variables you need are there.

    Good luck! Mark

  • Saeed

    Hi, im trying to use your calendar into a booking website, but I get this message: Unknown column ‘date’ in ‘where clause’

    can you help me with it so I am very grateful

  • mani619cash

    I am getting this error

    Notice: Undefined variable: calendar in C:wampwwwcalendarcalendar.php on line 43

    Fatal error: Call to a member function make_calendar() on a non-object in C:wampwwwcalendarcalendar.php on line 43

    • admin

      Looks like you are using wamp server.
      The code inside is not actually being executed. Enabling the short open tags should solve the problem.

    • Planetphp

      Looks like you are using wamp server.
      The code inside is not actually being executed. Enabling the short open tags should solve the problem.

      • mani619cash

        Yes, it did solve. Thanks.

  • James Njuguna

    Hey this is really great. Am embedding the calendar to a booking system am creating and if I get a problem ill let you know

  • Abdi

    Hi, i am getting this error message

    Warning: mysqli_query() expects parameter 1 to be mysqli, null given in /home/k112324/www/class_calendar.php on line 58 Warning: mysqli_error() expects parameter 1 to be mysqli, null given in /home/k112324/www/class_calendar.php on line 58

    Can you please help me with this?

  • Alpesh

    Warning: mktime() [function.mktime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in/Users/alpesh_virani/Sites/calendar.php on line 11

    Getting below error:

    Warning: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in/Users/alpesh_virani/Sites/calendar.php on line 12

    Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in/Users/alpesh_virani/Sites/calendar.php on line 13

    Warning: strtotime() [function.strtotime]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘PDT/-7.0/DST’ instead in/Users/alpesh_virani/Sites/calendar.php on line 14

  • Alpesh

    Getting below error

  • asad

    hi i am very new in designing, how can i add this calender to my site, i have uploaded the files already and connected to my index page, but showing nothing rather than a blank page.

  • Vicky

    i love this script, its working perfectly, i’m just trying to skip a slot time because i don’t want appointment during lunch from 12:00 till 13:30

    can you help me ??

  • Prachi Saxena

    Hello, I want to edit the start date and end date so that it can be highlighted only coming from my database rest are disabled. So how can I find and edit start date in your script. thank you.

    • admin

      r