Roughly following the tutorial from the CodeIgniter web site.