The preceding recipe used the CodeIgniter Calendar library to help build an interactive calendar. However, you could only view items in the calendar that were already in the database. The next logical step is building a small application that allows you to create items for the calendar with a form; a simple appointment manager would do the trick. We're basing this recipe on the previous one; however, you don't need to go back and work through that recipe. Everything you need is contained in this recipe.
We'll need to make a database table to store our appointments. If you have used the previous recipe, you should have the database table already; if so, run the following code in your database:
ALTER TABLE `appointments` ADD `app_description` VARCHAR( 255 ) NOT NULL AFTER `app_name`
Alternatively, if you haven't already got the table, run this code in your database:
CREATE TABLE `appointments` ( `app_id` int(11) NOT NULL AUTO_INCREMENT...