Question
PHP in VS Code Write a php program that allows user to choose the month and year. The user must select month and year from
PHP in VS Code
Write a php program that allows user to choose the month and year. The user must select month and year from the form else it will display error message. The user can mark for a special day and they must enter the day, description and color for that special day. Finally, the user press the submit query button and the calendar will be generated various options the user selected.
Implement the following files & functions:
html.inc.php:
1. html_CalendarForm() - Generates the html form to prompt the user
2. html_Errors($errors) - Displays the User Errors.
3. html_Calendar($data) - Displays the html Calendar based on the data from getCalendarData()
calendar.inc.php:
1. getCalendarData($month, $year) - Generates a single array of data containing all the information for the calendar.
Hints:
A calendar is always a grid of 7x6 rows.
It might be helpful to use two loops to generate the rows for the calendar.
If you pass the months and the year as integers you can use mktime to generate the appropriate timestamp.
Form for user to choose month, year and add description:
The calendar generated based on the previous form data:
Thank you in advance!
Month: January Year: 2019 Mark a special event. Special Event Day 1 Description New Years Day! Please selct a color. green Submit Query Sunday Monday Tuesday Wednesday Thursday Friday Saturday 1-New Years Day! 2 3 4 5 16 8 19 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started