December 2013
Intermediate to advanced
306 pages
6h 26m
English
A good place for us to begin is to display a list of our users. We're going to create a model, view, and controller to provide the functionality to do this.
We're going to create the following three files:
path/to/codeigniter/application/models/users_model.php: This file gives us CRUD support with the databasepath/to/codeigniter/application/views/users/view_all_users.php: This file contains a foreach loop, which runs through the results array, writing all users to a tablepath/to/codeigniter/application/controllers/users.php: This file contains the code necessary to handle the CRUD functionalitypath/to/codeigniter/application/controllers/users.php file:<?php if (! defined('BASEPATH')) ...Read now
Unlock full access