Now that you’re able to write a controller with methods, and call those methods from
index.php, the next step is to add the rest of the pages for managing the website. Currently, we can add jokes to the database through
index.php by specifying an
action URL parameter. However, a real website will need to do considerably more than handle basic database operations for a single table.
The next extension of the website will be allowing users to register as authors and post their own jokes. However, before we do that I’ll show you how to write a modern, flexible framework to build upon. By the end of this chapter, you’ll have the foundation for building any website, and you’ll have a good understanding ...