How I build User Registration and Form Validation Using CodeIgniter
Submitted by admin on Sunday, December 2, 2012 - 20:08.
The following is an important note in building a User Registration and Form Validation Using CodeIgniter.
routes.php
There are two lines that were change/added as follows:- $route['default_controller'] = "register";
- $route['success'] = "register/success";
autoload.php
On line 55 we have added database and session to load automatically. This means that you do not need to call it in your controller.$autoload['libraries'] = array('database','session');
config.php
There were only two lines of code that were changed here. At line 17:$config['base_url'] = 'http://localhost/CI/';
At line 227:
$config['encryption_key'] = '0rGBISBT61k7453Ooq6343KjtGe9Xjv4';
To generate a random key of your own please visit Random Keygen.
database.php
The last configuration is the database. Don’t forget to change the following as follows:- $db['default']['hostname'] = 'localhost';
- $db['default']['username'] = 'root';
- $db['default']['password'] = '';
- $db['default']['database'] = 'ci_tutorial';
Comments
Add new comment
- Add new comment
- 857 views