CodeIgniter comes with various pre-defined settings in it’s config.php file, but for form processing developer needs to manually configure some parameters.
This tutorial will demonstrate how to configure manually your CodeIgniter framework for form processing.
Configuration:
- Unzip the codeigniter package and upload its files and folders to your server.
- Open application/config/config.php file with any text editor and set your base_url(), also set an encryption key (if there is a requirment of session in your CodeIgniter application) as shown below.
- If your form accesses MySql database then, Open application/config/database.php file with any text editor set your default hostname, default username, default password and default database (if required) as shown below.
- For forms you have to load helpers in your CodeIgniter as : open application/config/autoload.php and set helper as shown below.
- If you want to auto load some libraries like database, session you can set it in application/config/autoload.php as shown below.
- For Form Validation you can directly load CodeIgniter’s Validation library in your controller function as shown below.
$this->load->library('form_validation');
Click here, to learn more about Form Validation in CodeIgniter.
Click here, to learn about Form Creation in CodeIgniter.
Conclusion:
This was all about configuring CodeIgniter for form processing. Read our other Blogs to learn CodeIgniter form with database processing.
3 Replies to “CodeIgniter Input Form Setting”
Nice post about CodeIgniter for beginners. Would be great to see how to build models, views and controllers. I think there are lot of people outside struggling with these “simple” OOP concepts as well.
Hello! Olaf,
We have got your concern. Your request has now been processed.
Always feel free to use FormGet in future too.
Your suggestions & feedback is highly appreciated.
Thanks & Regards,
FormGet.com
You can also join us on :
facebook : https://www.facebook.com/FormGet?ref_type=bookmark
twitter : https://twitter.com/hashtag/formget
google plus : https://plus.google.com/+Formget
$config[‘encryption_key’]