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


Okay, here are a few examples that will help put everything together.

User subscribes

The sequence of events taking place when a user subscribes are as follows:

  1. The user visits the application and CodeIgniter routes them to the signup controller.

  2. The index() function in the signup controller displays the views/signup/signup.php view file.

  3. The user views the form in the browser, enters their e-mail address, and submits the form with no validation errors.

  4. The index() function packages the users' input into an array called $data and passes it to the add() function of Signup_model.

  5. The add() function performs an Active Record insert to write the users' subscription to the signups database table.

User updates their settings

The following events take place when a user wants to update settings:

  1. The user clicks on a link in an e-mail they have been sent.

  2. The URL routes them to the signup controller's settings() function.

  3. The settings() function takes the third and fourth parameters of...