Okay, you should have already set up CodeIgniter and Bootstrap as described in Chapter 1, Introduction and Shared Project Resources. If not, then you should know that the code in this chapter is specifically built with the setup from the first chapter in mind. However, it's not the end of the world if you haven't—the code can easily be applied to other situations.
Firstly, we'll build the database. Copy the following MySQL code to your database:
CREATE DATABASE 'discuss_forum'; USE 'discuss_forum'; DROP TABLE IF EXISTS 'ci_sessions'; CREATE TABLE 'ci_sessions' ( 'session_id' varchar(40) COLLATE utf8_bin NOT NULL DEFAULT '0', 'ip_address' varchar(16) COLLATE utf8_bin NOT NULL DEFAULT '0', 'user_agent' varchar(120) COLLATE utf8_bin DEFAULT NULL, 'last_activity' int(10) unsigned NOT NULL DEFAULT '0', 'user_data' text COLLATE utf8_bin NOT NULL, PRIMARY KEY ('session_id'), KEY 'last_activity_idx' ('last_activity') ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE...