MySQL Table Search »

Event Calendar

Price: FREE Version: 1.0
The Event Calendar script is a free piece of PHP code to create an event calendar for you. Below is a description of the files used and what each one of them does.

calendar.css - external CSS file which lets you easily change the appearance. If you do not know how to locate the styles used for each calendar element please refer to "Inspect CSS styles using Chrome" video found here

calendar.js - all the JS functions used to scroll the calendar and the ajax calls made to load both the calendar and the events

calendar.php - this is the PHP script used to build and print the calendar widget

config.php - the file where mysql database login is defined

database.sql - mysql table structure

events.php - this is the PHP file which loads the events once you click on a date

example-page.html - a sample web page with embed calendar widget.

87 Comments to "Event Calendar"

Freek Derks December 16, 2014 at 1:20 am | Reply


Great work this template. but how can I change the months language to for example dutch.

Thank for your support.
Lenny December 15, 2014 at 1:55 pm | Reply


I like it.
lhey December 11, 2014 at 12:08 am | Reply


cant view posted events in other year.. pls help thanks
lhey December 11, 2014 at 12:03 am | Reply


posted events in other month didnt display. pls. help
lhey December 10, 2014 at 11:56 pm | Reply


thanks man this is great
Paul December 10, 2014 at 3:41 am | Reply


I have an events calendar already built on one of my sites that has the following fields:


I would like to integrate the calendar view along side my listing.

I've change the table to match what it is in my database, but I am getting this:

request "Could not execute SQL query" SELECT * FROM events WHERE `event_date` LIKE '2014-12-%'

Is it possible to incorporate my database into your calendar view?

Dasun December 3, 2014 at 6:32 pm | Reply


good Thanks
Malinda December 3, 2014 at 7:45 am | Reply


how can i display the events like popup when mouse hover with their corresponding day without clicking, is it possible?please help
Paul Bruneau November 29, 2014 at 3:43 am | Reply


Hey all,
Sorry to be asking such a newbi thing. This is my first serious look at PHP and I need to know how to modify the config.php.
When I run this through wamp, I will get the following error:
Unable to connect to MySQL server.

Please make sure your MySQL login details are correct.

How do I get beyond this?

Dan November 29, 2014 at 8:28 pm


You need to input the correct database parameters in the config.php file.
Paul Bruneau November 30, 2014 at 2:02 pm


That's just it, Dan

I don't know "what" to be editing, nor what to replace "REPLACE" with
Dan November 30, 2014 at 3:07 pm

Read that. You've also got to import database.SQL into your phpMyAdmin. If you don't know what any of that means, this calendar is likely a bit too advanced at your current level. You should read up on php/MySQL connections and functions and phpMyAdmin.
Dan November 24, 2014 at 4:08 pm | Reply


Hey all... I've got this working and hooked up, but I'm trying to add functionality... I'm trying to make it automatically display the events on the current day (if there are any) by default, without having to click anything. Here's what I've done...

On calendar.js, I added some lines at the bottom: (Note: I've made changes to the directory and file names, but all are still functioning properly)

function LoadMonth(month, year) {
ajaxpage("admin/event_calendar.php?month="+month+"&year="+year, "Calendar")
function LoadEvents(date) {
ajaxpage("admin/cal_events.php?date="+date, "Events")
function LoadToday(date) {
ajaxpage("admin/current_date.php", "Today")


My current_date.php file loads the current date just the came as the event.php file does, and when I access current_date.php directly, it works fine in displaying the events that are registered for that specific date.

When I load the calendar, it does not load the events for that day. It loads up like normal and seemingly ignores the LoadToday() command.

I know little to none about javascript, so perhaps I've missed something altogether. Any help?


Please be polite and helpful and do not spam or offend others. We promise you will be treated the same way.

Log in your free account or if you still haven't joined you can create your free account now.

Posting tip:
if you use code in your comments please put it in these tags [php], [sql], [css], [js]
PHP code example: [php] echo date("Y-m-d"); [/php]

Thank you,
~ PHPJabbers team ~