Question
php website programming question: In this assignment the goal is to first write events into a SQLite3 database and then read these events from a
php website programming question:
In this assignment the goal is to first write events into a SQLite3 database and then read these events from a SQLite3 database and display on the calendar the upcoming events.
Description
Your PHP code in the file update_database.php, should process the data a user fills in on the create_event.html page. Then your program calendar2.php should display the events in the correct time slots and for the correct person. The functionality of your programs should be similar to the example on the homework page. For example, consider that we set in the create_event.html the person to be Joe and the date to 5-20-2011 and time is set as 15:00. The user writes the event title as: "Soccer practice" and event message: "Bring the ball". Then the calendar2.php should show for 5-20-2011 in the Joe column in the 3:00pm slot: "Soccer practice: Bring the ball". You will also "upgrade" your calendar.php from last week to display at the bottom of the calendar three buttons labeled: "previous", "now" and "next". The button labeled "previous" should move the start hour displayed back by 12 hours. The button labeled "next" should move the start hour forward by 12 hours. Finally the button labeled now should display the calendar with the current date and time.
Directions
You will write a php file called update_database.php. This program will receive the form data when the user presses submit on create_event.php. It will then process this data and save the data into a SQLite3 database.
Your program calendar2.php is much like your calendar program from HW5, except now it will also read data from your SQLite3 database. For each slot (person and time) your code should call a function called get_events($person, $timestamp). This function will return a string containing all events that should be displayed in the time slot in question.
Directions for your database
Your database is called dbyourusername.
Your table should be called event_table
Your table should contain field time which is a timestamp it is going to be an integer with perhaps as many as 12 digits.
Your table should contain a field person which has character data. (Reserve some reasonable amouunt of characters for a name.
Your table should contain fields event_title and event_message. Both contain character data max of perhaps 300 characters.
Requirements
Your program should be in two files called calendar2.php and update_database.php those files should reside in your public directory along with CSS files called calendar.css and create_event.css.
When your program is finished, create a text file called calendar2.txt and copy and paste the contents of your calendar2.php file into calendar.txt. Similarly create a text file called update_database.txt. Put calendar.txt and update_database.txt in your public directory as well.
By default when your page is loaded it should display current day, date and time as shown in the example.
Your program must use a function called get_event to get the events for the calendar to display.
Your program must function as in the example given.
You must have the three buttons: previous, today, and next that function in the way described above.
Expected Output:
url: http://www.math.ucla.edu/~virtanen/40a.1.17su/assignments/hw6/create_event.html
url: http://www.math.ucla.edu/~virtanen/40a.1.17su/assignments/hw6/calendar2.php
Simple Event Joe O Joanna O Lil Cub Date should be in format M-D-Y. For example 11-24-2015. Time is 24 hour time in format H:mm. For example 15:00. Date Event title Create event Time Event messageStep 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