-
Book Overview & Buying
-
Table Of Contents
CodeIgniter 2 Cookbook
By :
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 database
path/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 table
path/to/codeigniter/application/controllers/users.php: This file contains the code necessary to handle the CRUD functionality
Copy the following code into the, path/to/codeigniter/application/controllers/users.php file:
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
class Users extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->helper('form');
$this->load->helper('url');
$this->...
Change the font size
Change margin width
Change background colour