View Full Version : Create a calendar with php

04-12-2012, 01:50 AM
Trying to help my friend create a calendar. It would be able to display the calendar for any month from January starting from the 1970s and into December of 2040. I have had a little success creating the calendar (i'm somewhat new to php) and i wanted to let the user choose the month and year from drop down boxes along with a submit button. Ideally, after they would submit, the program would then display the calendar for that selected month and year. I've really been stumped and could use some example code to go off of or possibly just some code to use.

Anything helps, i really appreciate it!

04-12-2012, 01:52 AM
None of these examples work for you?


04-12-2012, 02:05 AM
A little, but even when i try the sample code they have, it says

Undefined index: month in C:\xampp\htdocs\project 2\newfile.php on line 2

Undefined index: year in C:\xampp\htdocs\project 2\newfile.php on line 3

shouldnt it display the current year and month?

04-12-2012, 02:19 AM
Those are "notices" or "warnings" ... they are not fatal.

For now, while you are scripting, you can suppress those error messages.

That would be a configuration setting for your server's PHP.
You're running this on your own server ... not much I can help you with there.