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

Creating views


There are four views in this project, and these are as follows:

  • /path/to/codeigniter/application/views/jobs/view.php: This displays a list of current jobs to the user.

  • /path/to/codeigniter/application/views/jobs/create.php: This view allows the job advertiser to enter the job advert details. The form submits to the jobs controller's create() function.

  • /path/to/codeigniter/application/views/jobs/apply.php: This displays a form to the user allowing them to enter information to apply for the job. It also displays validation errors.

  • /path/to/codeigniter/application/views/nav/top_nav.php: This displays the top-level menu. In this project, this is very simple as it contains a project name and link to go to the jobs controller.

These are our four view files. Now, let's go over each one, build the code, and discuss how it functions.

Create the /path/to/codeigniter/application/views/jobs/view.php file and add the following code to it:

<div class="page-header">
  <h1>
    ...