Book Image

CodeIgniter Web Application Blueprints

Book Image

CodeIgniter Web Application Blueprints

Overview of this book

Table of Contents (16 chapters)
CodeIgniter Web Application Blueprints
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Putting it all together


Now that we've created each file and resource necessary for the app, let's run through a few scenarios so that we can get a good idea of how it all works together.

A user creates a discussion forum

Let's consider an example where David visits the discussion forum in his browser. The following is the sequence of steps:

  1. David clicks on the New Discussion link in the top navigation bar.

  2. CodeIgniter loads the create() function in the discussions controller.

  3. The create() function displays the discussions/new.php view file, which displays a form to users, enabling them to enter their name, e-mail, discussion title, and discussion body text.

  4. David presses the Go button to submit the form. The form is submitted to the discussion controller's create() function.

  5. The discussion controller's create() function validates the form. Assuming there were no errors, the create() function packages the post data into an array and sends it to the create() function of discussions_model.

  6. The create...