Create an Event calendar using PHP and jQuery
When I first saw this cool astonishing iCal-like calendars with jQuery by Stefano Verna I became a fan of it. Its a great looking calendar. But it is static, if you want to show another month or want to change the current date you have to change the html code inside. So, I thought it would be great if I can make this calendar dynamic using PHP & MySQL. So, here is my attempt to make this great thing more useful.
MySQL table creation
First of all we have to create a new table named ‘eventcal’ in MySQL. We can create a new database to contain this new table or can use any exisiting database. Here is the SQL code :
CREATE TABLE eventcal ( id int(10) unsigned NOT NULL auto_increment, eventDate date, eventTitle varchar(100), eventContent text, PRIMARY KEY (id) )
Add New Event Area
Now we will make a simple panel to add new events to the ‘eventcal’ table in MySQL.
For this part we will use Keith Wood’s jQuery Datepicker plugin.

Here is the source code of the page to add new events – addevents.php:
<?php
//Database connection details
$host = "localhost";
$mysql_user = "dbusername";
$mysql_password = "dbpassword";
$mysql_db = "dbname";
//make connection with mysql and select the database
$mysql_connect = mysql_connect($host, $mysql_user, $mysql_password);
$db_select = mysql_select_db($mysql_db);
//$alert will be used to show alert message for success or error report
$alert = "";
//check if the form is submitted
if(isset($_POST['add']))
{
//check for empty inputs
if((isset($_POST['date']) && !empty($_POST['date'])) && (isset($_POST['eventTitle']) && !empty($_POST['eventTitle'])) && (isset($_POST['eventContent']) && !empty($_POST['eventContent'])))
{
//add new event to the database
$query = "INSERT INTO eventcal (`eventDate`,`eventTitle`,`eventContent`) VALUES('". $_POST['date'] ."','". addslashes($_POST['eventTitle']) ."','". addslashes($_POST['eventContent']) ."')";
$result = mysql_query($query);
//check if the insertion is ok
if($result)
$alert = "New Event successfully added";
else
$alert = "Something is wrong. Try Again.";
}
else
{
//alert message for empty input
$alert = "No empty input please";
}
}
?>
<html>
<head>
<title>Add New Events</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<link rel="stylesheet" href="datepick/jquery.datepick.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" src="datepick/jquery.datepick.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//configure the date format to match mysql date
$('#date').datepick({dateFormat: 'yy-mm-dd'});
});
</script>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
<table align="center">
<tr>
<td colspan="2">
<h2>Add a New Event</h2>
</td>
</tr>
<tr>
<td>Date : </td>
<td><input id="date" name="date" size="30"></td>
</tr>
<tr>
<td>Event Title : </td>
<td><input id="eventTitle" name="eventTitle" size="50"></td>
</tr>
<tr>
<td>Event Details : </td>
<td><textarea cols="40" rows="5" name="eventContent" id="eventContent"></textarea></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Add Event" name="add"></td>
</tr>
</table>
</form>
<?php
//check if there is any alert message set to $alert
if(isset($alert) && !empty($alert))
{
//message alert
echo '<script type="text/javascript">alert("'.$alert.'");</script>';
}
?>
</body>
</html>
I configured the date format of the datepicker plugin to match the MySQL date data type.
$('#date').datepick({dateFormat: 'yy-mm-dd'});
MySQL date data type stores date in YYYY-MM-DD format (2009-04-05).
The Calendar
We came to the last part, generate the dynamic calendar. I did some little changes to the original calendar made by Stefano Verna – removed the weekdays from the tfoot and added links for month navigation, changed the popup position in coda.js ( mainly to handle the problem of popups hiding in the top for first days of the month ) and added a little bit of css in the master.css for the month navigation links in tfoot.

Here is the source code of the calendar page calendar.php
<?php
//Database connection details
$host = "localhost";
$mysql_user = "dbusername";
$mysql_password = "dbpassword";
$mysql_db = "dbname";
//make connection with mysql and select the database
$mysql_connect = mysql_connect($host, $mysql_user, $mysql_password);
$db_select = mysql_select_db($mysql_db);
//check if time is set in the URL
if(isset($_GET['time']))
$time = $_GET['time'];
else
$time = time();
$today = date("Y/n/j", time());
$current_month = date("n", $time);
$current_year = date("Y", $time);
$current_month_text = date("F Y", $time);
$total_days_of_current_month = date("t", $time);
$events = array();
//query the database for events between the first date of the month and the last date of month
$result = mysql_query("SELECT DATE_FORMAT(eventDate,'%d') AS day,eventContent,eventTitle FROM eventcal WHERE eventDate BETWEEN '$current_year/$current_month/01' AND '$current_year/$current_month/$total_days_of_current_month'");
while($row_event = mysql_fetch_object($result))
{
//loading the $events array with evenTitle and eventContent wrapped with <span> and <li>. We will add them inside <ul> in later part
$events[intval($row_event->day)] .= '<li><span class="title">'.stripslashes($row_event->eventTitle).'</span><span class="desc">'.stripslashes($row_event->eventContent).'</span></li>';
}
$first_day_of_month = mktime(0,0,0,$current_month,1,$current_year);
//geting Numeric representation for the first day of the month. 0 (for Sunday) through 6 (for Saturday).
$first_w_of_month = date("w", $first_day_of_month);
//calculate how many rows will be in the calendar to show the dates
$total_rows = ceil(($total_days_of_current_month + $first_w_of_month)/7);
//trick to show empty cell in the first row if the month doesn't start from Sunday
$day = -$first_w_of_month;
$next_month = mktime(0,0,0,$current_month+1,1,$current_year);
$next_month_text = date("F \'y", $next_month);
$previous_month = mktime(0,0,0,$current_month-1,1,$current_year);
$previous_month_text = date("F \'y", $previous_month);
$next_year = mktime(0,0,0,$current_month,1,$current_year+1);
$next_year_text = date("F \'y", $next_year);
$previous_year = mktime(0,0,0,$current_month,1,$current_year-1);
$previous_year_text = date("F \'y", $previous_year);
?>
<html>
<head>
<title><?=$current_month_text?></title>
<link rel="stylesheet" href="css/master.css" type="text/css" media="screen" charset="utf-8" />
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.pack.js"></script>
<script src="js/coda.js" type="text/javascript"> </script>
</head>
<body>
<h2><?=$current_month_text?></h2>
<table cellspacing="0">
<thead>
<tr>
<th>Sun</th>
<th>Mon</th>
<th>Tue</th>
<th>Wed</th>
<th>Thu</th>
<th>Fri</th>
<th>Sat</th>
</tr>
</thead>
<tr>
<?php
for($i=0; $i< $total_rows; $i++)
{
for($j=0; $j<7;$j++)
{
$day++;
if($day>0 && $day<=$total_days_of_current_month)
{
//YYYY-MM-DD date format
$date_form = "$current_year/$current_month/$day";
echo '<td';
//check if the date is today
if($date_form == $today)
{
echo ' class="today"';
}
//check if any event stored for this date in $events array
if(array_key_exists($day,$events))
{
//adding the date_has_event class to the <td> and close it
echo ' class="date_has_event"> '.$day;
//adding the eventTitle and eventContent wrapped with <span> and <li> to <ul>
echo '<div class="events"><ul>'.$events[$day].'</ul></div>';
}
else
{
//if there is not event on that date then just close the <td> tag
echo '> '.$day;
}
echo "</td>";
}
else
{
//showing empty cells in the first and last row
echo '<td class="padding"> </td>';
}
}
echo "</tr><tr>";
}
?>
</tr>
<tfoot>
<th>
<a href="<?=$_SERVER['PHP_SELF']?>?time=<?=$previous_year?>" title="<?=$previous_year_text?>">««</a>
</th>
<th>
<a href="<?=$_SERVER['PHP_SELF']?>?time=<?=$previous_month?>" title="<?=$previous_month_text?>">«</a>
</th>
<th> </th>
<th> </th>
<th> </th>
<th>
<a href="<?=$_SERVER['PHP_SELF']?>?time=<?=$next_month?>" title="<?=$next_month_text?>">»</a>
</th>
<th>
<a href="<?=$_SERVER['PHP_SELF']?>?time=<?=$next_year?>" title="<?=$next_year_text?>">»»</a>
</th>
</tfoot>
</table>
</body>
</html>
You can see the changes in tfoot from the source code.
This is the change I did in coda.js
popup.css({
top: 20,
left: -76,
display: 'block' // brings the popup back in to view
})
I just changed the bottom:20 from the code original to top:20.
This is the extra snippet of CSS I added to the original master.css for month navigation links.
th a{
text-decoration:none;
font-size:120%;
font-weight:bold;
color: #000;
outline-width:0;
}
Harish Chauhan’s Calendar Events Class on phpclasses.org helped me a lot. Thanks to him.
View the online demo (only the calendar)
Download the source files
Well, that’s all. This is the first blog post of my life. I hope you enjoyed it.
I'm Bari Hossain, a freelance Web Developer and PHP & jQuery lover from Dhaka, Bangladesh. I spend a good part of my times reading interesting posts from different blogs and always try to learn from them.
Hi,
I really like the demo. I am studying this and it works really good. Why does the mouse over comment window go behind the date when using IE 7 but work perfectly when using Firefox?
Is it a problem within the css or javascript?
If you find time, please respond.
Looking g8 ! I become really a g8 fan of you. Just keep it up with twitter and your blog. And thanks a lot for sharing these resources I am gathering much knowledge from that which are really appreciable and thanks a lot once again.
Hi, nice script!
Look the demo, its working not so good, whats wrong?
Greetings
Delano
@Johnny Its a problem within the CSS. You can fix this problem by removing position: relative; from td, th in master.css. I got this solve from here
@Delano You may be pointing to the same problem as Johnny.
Hi Bari, thanks, works great now!
Thanks for the fix. It works great now. I looking forward to learning more jquery. It seems to be a great package.
Very helpful indeed.
Congratulations on your first post !
Hi Bari,
Looks very nice, I’m using the same script in my calendar (from Harish Chauhan). But when I put a hyperlink in the event, it doesn’t work.
Didn’t download your version yet, but I was wondering, does your calendar work with hyperlinks or html-code in the events?
@Ruben You can see at line 36 in calendar.php, the event content stripslashes($row_event->eventContent) is added inside a span. So, you can put hyperlinks or html-code in the events.
Thanks Bari! Stupid me, I should’ve known…
Hi, i am a newbie to php, but i m ask to create a php event calendar. I have downloaded the source file and try with it. Somehow when I try to add the event, “Something is wrong. Try Again.” ocurred. According to the command,”check if the insertion is ok”,the alert message will pop up if the insertion is wrong. But no matter how I insert, the same alert message pop up. How to fix it? (I first choose the date, and then key in the event title, and event details.) Will it be better if not insist the user to key in the event details? because sometimes we just want it to be a reminder instead of detail information of that date.
Besides that, on top of that, there is a line of warning.
Warning: mysql_connect() [function.mysql-connect]: Access denied for user ‘dbusername’@'localhost’ (using password: YES) in C:\xampp\htdocs\eventcal\addevents.php on line 9
how to get rid of this problem?
thanks in advance to answer my question.
Really nice work, Bari. Appreciate it.
I might be able to solve this myself, but out of convenience; how do you swap Sunday for Monday as first day of the week? Also, is there a way to swap month names (ie language) using an array?
hi bari, thanks for your script. works good and nice look.in IE when mouse over date move up. can you fix this problem
This is great! Ive been looking for a tutorial on mysql/php calendar and this is a GREAT starting point to customize and make my own. AWESOME job.
Hi Bari,
Is it possible to start on Monday in place of Sunday ?
Greetings Peppetto
Bari,
It’s not polite to delete a reply from somebody if you don’t know the answer.
It was just a question !
Bari,
This is the best event calendar I have ever seen.
Thank you for making/enhancing it.
@PJ In the database connection area change the host, username, password and database name according to your settings.
@Micke @peppe To start the week from Monday,
replace the following lines :
//geting Numeric representation for the first day of the month. 0 (for Sunday) through 6 (for Saturday).
$first_w_of_month = date(“w”, $first_day_of_month);
//calculate how many rows will be in the calendar to show the dates
$total_rows = ceil(($total_days_of_current_month + $first_w_of_month)/7);
//trick to show empty cell in the first row if the month doesn’t start from Sunday
$day = -$first_w_of_month;
With these lines:
//geting Numeric representation of the day of the week for first day of the month. 0 (for Sunday) through 6 (for Saturday).
$first_w_of_month = date(“w”, $first_day_of_month);
if($first_w_of_month==0)
$first_w_of_month=7;
//how many rows will be in the calendar to show the dates
$total_rows = ceil(($total_days_of_current_month + $first_w_of_month)/7);
//trick to show empty cell in the first row if the month doesn’t start from Sunday
if($first_w_of_month==0)
$first_w_of_month=7;
$day = -($first_w_of_month-1);
And also change the order of the days in calendar table’s thead.
About month name in your language
I used $current_month_text = date(“F Y”, $time); to show the month and year together. But, you can split them in two parts like :
$current_month_text = date(“F”, $time).” “.date(“Y”, $time);
Now you can use an array like :
$months_in_my_language = array(“January” => “January in your language”,……….,”December” => “December in your language”);
And utilize the array in this way
$current_month_text = $months_in_my_language[date("F", $time)] .” “.date(“Y”, $time);
Hope this would help you.
Thanks to all for your replies.
Thanks for this! Really great – easy to use and i have no idea about MySQL and know little about PHP and managed just fine!
One thing i would say though is you can go and create a new event – but what happens if you need to change it? ie, if a client needs to change it themselves. I dont want them digging around in the SQL!
Can you create a Delete/Edit event php?
Many thanks, alex
HI Bari,
The calendar is really very cool.
I have a query. When I download the source and run on my localhost I faced a Notice stating :
“Notice: Undefined offset: 20 in D:\wamp\www\Test\ecal\eventcal\calendar.php on line 37″ similarly on every date on which I add an event it was coming in form of Notice. I searched it out and got to know that I’m referring to an array key that doesn’t exist. Also in this case I am unable to print the selected month and year.
Can you please help me to sort it out that where am I making a mistake.
Thanks in Advance.
Shantanu
it is very bad
Hi, great job!
Best calendar design around!
Is there any chance to show more than 1 month. Let’s say 2 o 4 months?
A great piece of work, thanks. Gives me confidence to implement more php and mysql.
I am wondering though whether I have found a bug. On my system, Linux Fedora 11 with PHP extension 20060613, the calendar doesn’t display any events for the current day. It seems that the class=”today” overrides the class=”date_has_event”. If I comment out the test for if($date_form == $today) then events appear. Is it possible to add the two classes together, or is there some other solution?
Nice work, Bari.
1 question – how about the function for “delete an event”?
Hi Bari,
Have you noticed that if an event occurs on today’s date it is not shown as an event on the calendar? If you change the date on your computer, it will act as normal.
Thanks again for your work,
Johnny
Hi Bari,
I am not too familiar with CSS programing but if you comment out the following:
//check if the date is today
if($date_form == $today)
{
echo ‘ class=”today”‘;
}
The event will appear without showing the designated background for “today”. How can you show that this date is “today” as well as showing the event(s) for this date? I am assuming it is associated with CSS class ids.
Any comments will be useful.
Johnny
Thanks a lot, very helpful !
I was able to use it right away.
Bari-
I removed position:relative from td, which fixed how the popup looks in Internet Explorer. However, it’s still a problem for Safari and Chrome.
Any ideas on how to fix that?
Thanks!
Hi Bari,
I want to make same event Calendar but in asp.net. Could you help me ont this.
Thank you
Not sure if any of you are facing this problem,
When I add an event for today 11/07/09, the events box does not pop up when I mouse over the date 11/07/09.
Awesome script bro. Thanks a ton!
This is such a cool calendar. I’ve looked everyone for one like this.
I’m having the same problem PJ was having – I keep getting “Something is wrong. Try again” when I try to add an event. I have the host, username, and password for the database correct.
Any suggestions?
Ok, I’ve figured out how to get it to work now. Is there a way to remove events once they are posted?
Thanks so much!
Good Stuff
to PJ,
use IP 127.0.0.1 instead of localhost. firstly pls make sure u hve changed host, username, password and db name to ur settings.
Wow, great tutorial! Thanks for taking the time to share your knowledge.
Hi Bari.
Nice post and awesome work.
studied your code and i saw one thing in this
at the time of next month OR next year OR previous month OR previous page
page is refreshed, is it possible that page will never refresh but data will?
if yes then plz tell me how.
my mail id is
aakash.malik@gmail.com
eagerly waiting for your +ve reply.
thanx buddy
first off- this is a great calendar – i’d originally had a very basic php one and I’m stoked to have found this. A question about safari though, the pop up background height doesn’t snap to the height of the content. have you found this or has someone found a way to fix it?
Hi Bari!, i’m a newbie in php, I’m having a problem, the thing is that when the event is today it doesnt show it, i hope you understand my bad english =), thanks!
Hi Bari,
I was trying to put the calendar inside a html table in a php class, in order to use it on a website but because of the css file, is loading the pictures of the calendar in every table con the screen.
Do you know how can fix that?
Thanks
Perfect. Just what I needed. From stefanoverna.com to you in less than 5 minutes. Keep on blogging!
I really like this calendar. Great work.
It works well except when I add an event I get this error.
Notice: Undefined offset: 21 in C:\wamp\www\mysite\eventcal\calendar.php on line 36
Do I need to change something, or enable a setting?
Thanks
Hi Bari, thanks for the wonderful script.
I’m attempting to embed the calender into another page using
It seems to show the calendar okay but when you hover the mouse over an event, it will not show up.
Is there a way to fix this? I’m not very advanced in coding so any help would be much appreciated.
Sorry, it didn’t show up on my last post… But I was using php include(“calendar.php”); to embed the calendar.
Nice work. One problem, the calendar is not picking up dates that fall on the 31st of any month that has 31 days… Any ideas?
nice work Bari…really working gr8.But after posting an event in the calendar part the events are not showing proper in the event posted date.
wats rong wid tat.If time permits pls respond.tnx Nijananda
Hi Bari,
Great Post! Very nice Calendar! I am trying to put it to use right now, but I ran into a problem. What I changed is that before the first day of the month I have numbers from the prior month and after the last day of the month are the numbers of the days for the upcoming month.
The numbers after the last day of the month were simply ‘32,33,34′ for example, so I just created an if statement that checks if the number is greater than the total numbers of days in the current month and if so, then subtract the total numbers of days in the month from ‘32′ for example, which would then make it appear as ‘1,2,3′ for the next month at the end of the table.
My problem is creating an if statement that somehow knows what the last days of the prior month was. The problem is that some months have 30 days and some have 31 days. Also, the month of February and leap years are a problem. Does anyone know an if statement so i can make it appear as ‘28,29,30′ from the previous month?
Thank you very much for your successfully integration event calendar by php mysql, I am really happy to got your source code. I have also integrated this calendar into my own system.
hello..I’m new to PHP..
that is a very nice calendar..
I’m making booking system..
i want to show the start date until the end date in the calendar..
and want to bold the range of the date..
can you teach me how to do it..
pliz reply as soon as possible if you can..
hello, thanks for the calendar is very good …
to solve the problem that events do not appear for the same day, there are only copying the function $ ( ‘. date_has_event’). each (function (){… this coda.js the file, paste and change date_has_event by today, which would be the name of the class ..
Hi Guys,
Just want to ask if you resolve the problem of the date moving up on IE’s when you hover on it just as the same problem by Mohamed.
Thanks
I think that is also the same in this situation. ,
I just found your blog and am enjoying it. ,
I found a solution to the problem with current date events…
im using this code:
//check if the date is today
if($date_form == $today)
{
echo ‘ class=”today’;
}
else
{
echo ‘ class=”‘;
}
//check if any event stored for the date
if(array_key_exists($day,$events))
{
//adding the date_has_event class to the and close it
echo ‘ date_has_event”> ‘.$day;
//adding the eventTitle and eventContent wrapped inside & to
echo ”.$events[$day].”;
}
else
{
//if there is not event on that date then just close the tag
echo ‘”> ‘.$day;
}
echo “”;
// END
Hope this help someone… (sorry for my english)
this is verygood example….i need limited record on perticular date what can i do???i ned only 3 event in one date if more then 3 in 1 day then i have to see the MORE button with that 3 events
what can i do?????
Hi Bari,
is a very nice calendar..
when I probe did not show the name of the month
so fix it in title & h2 tags
errors that I could not fix are
Notice: Undefined offset: 18 in C:\Server\www\eventcal\calendar.php on line 36
when I press the link next month or year:
Error 403
You don’t have permission to access /eventcal/< on this server.
I'm testing on a local server with wamp
thanks in advance
Hi bari, thank you for your great calendar. I’ve managed to change the language using your tips, and I used the same tips to change also the language of the labels showing at the bottom. Next I connected it to a wordpress database to catch its events, hope I’ll be able to include it soon in wordpress also. About events not showing up on current day, I messed a lot with the php and css and it seems that the class=”today” overrides the class=”date_has_event”, as Peter said above. I’m not a programmer but I checked that changing the “.data_has_event” at the top of the coda.js file with “.today”, events on current day show up but other events quite obviously don’t. Now I don’t know how to do it but maybe the “to do” fix is there.
Ty and keep up the good work!
Ok, after messing a lot with that coda.js file. Since I’m not a programmer I tried different ways to fix the “events not showing up on current day” in the js, but I got it only duplicating the function in the coda.js file. I assume it’s not the best way due to duplicated varables, but I’ve not been able to use the function on a (‘.date_has_event’, ‘.today’) array. So I duplicated the function, the first is the original (‘.date_has_event’), the second one is the copy acting on the ‘.today’ parameter. This is what I did in the js:
Before:
$(function () {
//Function using (‘.date_has_event’)
});
After:
$(function () {
//Function using (‘.date_has_event’)
//Copy of the above function, using (‘.today’)
});
Any help to give this a better coding will be appreciated, anyway it seems it’s visually working.
Ty
Hi, your calendar is awesome!
Please, when I put the mouse on a day that has an event,
shows up a popup,
but this popup is fixed, how can I put it to be resisable?
thanks
for the first time I managed to implement a tutorial to functioning scripts without getting years older – I thoght. As you can see my events are hidden in the day window – whats wrong?
The above problem resolved, but now a new one arised:
When I hover a day with an event only the title shows up.
Watch http://www.jea.se/stella/stella7.php
Any hint?
For showing events for today just comment out these lines in calendar.php:
//check if the date is today
if($date_form == $today)
{
echo ‘ class=”today”‘;
}
from line 101 to 105.
In this way,
/*//check if the date is today
if($date_form == $today)
{
echo ‘ class=”today”‘;
}*/
OR, you can remove those lines too.
I have deleted the position:relative; in masters.css as indicated, but it’s still not working in IE, but vorking just fine i FF. Some ideas?
I have similar project jQuery calendarLite plugin: http://snowcore.net/jquery-calendarlite-plugin
Hi,
Nice Calendar ! Does anybody know how to fix the display issue with multiple events on Iphone browser or Safari browser ? You test it and you know what I mean..Any hint ?
Thanks.
I like the calendar. However it will only let me do one event then the error “Something is wrong. Try again.” appears. Not sure why I can only add one event. Any ideas?
Hi,
Great work..
I have an events table,
where there is a start date and a finish date.
So i would like to show the repetition of data.
example:
event1 starts on 25th dec end on 28th dec.
So is there a way to show this event on the specific dates on the calendar?
Please suggest.
Hi
it’s excellent work , but when i click for next year hyperlink (>> >>) it shows the following url in browser “http://localhost/eventcal_new/?time=”.
if possible please tell me the solution of above problem as early as possible.
Notice: Undefined offset: 31 in C:\wamp\www\WCMS\eventcal\calendar.php on line 37
Forbidden
You don’t have permission to access /WCMS/eventcal/< on this server.
wcms is my root document.
The calculator will work great without these errors. Am able to add new events too.
Can anyone help to get rid of these errors please
Was wondering if there was a way to just get the title of the event to apper on the calendar. Then have the rollover on the title bring up the details. Would that be possible?
Hi,Thanks for your great job!!
To solve the problem of displaying the event, just delete the position:relative in line 31 of masters.css …Then the problem will be fixed no matter you use Internet Explorer anf Firefox.
But i still get problem in
Notice: Undefined offset: 12 in C:\wamp\www\catering\membership\group\schedule\calendar.php on line 37
Can anybody help?
hi,
Nice Calendar !
how to display events on click .
regarding events for today problem. Just change class to id like this and add css to it.
if($date_form == $today)
{
echo ‘ id=”today”‘;
}
I think I will never see this page again, because a few days ago your website was total dead. I search another alternate, but all redirect to your webpage..
Oh..thanks, finally..
Hi Bari!
The calendar is great work, it woks perfectly, and I made add, edit, and delete, functionality in CMS interface, but can you help me please, how can I change the first day in the week? In my country, week begins with the Monday, and not Sunday…:)
Thank you in advace!
Robert
I used this calendar and it works normal except that I get an unexpected offset error. I read through the comments but there was no answer regarding that error. can someone help me pls? thanks a lot.
the error says, unexpected offset 1 at line 31
To get rid of the “offset” error reports put this at the top of calendar.php
To get rid of the “offset” error reports put this at the top of calendar.php
// Report all errors except E_NOTICE
error_reporting(E_ALL ^ E_NOTICE);
Hey bari
hello i used your script for my website but it shows
Notice: Undefined offset: 21 in C:\wamp\www\mysite\eventcal\calendar.php on line 36
why? i don’t know so can you suggest me the solution for this?