Hi, in this post we are going to cover Codeginiter tutorials for beginners. Codeigniter is a widely used MVC (Model view controller) framework in PHP. PHP has various frameworks like Laravel, CakePHP, CodeIgniter. CodeIgniter is a very simple framework which is widely used by Web developers. We will cover some of the important concepts in CodeIgniter tutorial which will make it easier for the beginners to get started.
Why To Learn CodeIgniter Framework?
Very Simple To use, allows to build robust, scalable, real-time web applications without hassle. CodeIgniter Framework is developed by Ellis Lab. It is a MVC framework and light weight for building web applications. It is open source and there are tons of resources and development community.
CodeIgniter Tutorials for Beginners: Getting Started
Step 1) How to Install CodeIgniter
In order to install codeigniter firstly download codeigniter latest version from the official website of codeigniter. Here’s a link Download Codeigniter.
Once you download codeigniter extract the zip file and save the folder in c://wamp/www folder. Once you are done with this you will need to make minor changes in few files.
Step 2) Change Config.php file
Open the applicaion/config/config.php file. In this you will need to change the base url. Change default base url to
$config[‘base_url’] = ‘http://localhost/codeignter/’;
Now we are saving HTML, PHP code in $config[‘base_url’] = ‘http://localhost/codeignter/application/views’ file. We will save Controller and model file in controller and model folder respectively. Controller essentially is a file which interacts with our view or User interface and (Model) Database.
Step 3) Connect CodeIgniter To Database
You will need to enter the configurations in the database.php file which is located in applicaion/config/ folder. Make changes in $db array. Here’s a reference of what my database.php $db array looks like.
$db['default'] = array( 'dsn' => '', 'hostname' => 'localhost', 'username' => 'root', 'password' => '', 'database' => 'codeigniter_insert', 'dbdriver' => 'mysqli', 'dbprefix' => '', 'pconnect' => FALSE, 'db_debug' => (ENVIRONMENT !== 'production'), 'cache_on' => FALSE, 'cachedir' => '', 'char_set' => 'utf8', 'dbcollat' => 'utf8_general_ci', 'swap_pre' => '', 'encrypt' => FALSE, 'compress' => FALSE, 'stricton' => FALSE, 'failover' => array(), 'save_queries' => TRUE );
Here my database name is codeigniter_insert which i already created through PHPMyAdmin. Once you are done with this you are good to go.
CRUD Tutorial in CodeIgniter
CRUD is a very important function in Database Management System. It is the backbone of any web application. It stands for Create, Read, Update and Delete. CRUD is used everywhere. We will be using MySQL for CRUD in Codeigniter. CRUD is essentially Insert, Update, Delete and view data feature. We have covered a very nice tutorial for CRUD in Codeigniter. You can refer to that tutorial for more details.
CodeIgniter Login System Tutorial
Login System is a very key feature of any web application. We have covered a very nice tutorial for CodeIgniter Login System. Go through it and let me know if you have any doubts.
Registration System In CodeIgniter with Bootstrap
User Registration form is a very useful feature for membership driven applications. We may need to signup new users for our portal. So have already covered a very comprehensive Registration Tutorial in CodeIgniter. Feel free to check that.
Ajax Registration Form in CodeIgniter Tutorial
We already have seen simple registration form, but in this tutorial we have added ajax using jQuery for Registration in CodeIgniter. We may want to add simplicity in our forms and what better than ajax to save time and present great user experience. Read Ajax registration in Codeigniter tutorial.
Image or File Upload in CodeIgniter
CodeIgniter provides vast number of libraries and helper classes for making web developement easier. In CodeIgniter we have used upload library to upload files or images. Image or file upload functionality is very important when we want to ask users to upload images or resumes. In this post we have covered Image upload in codeigniter. Follow complete tutorial here.
Join Query in CodeIgniter
Joins are very important when it comes to fetching data from multiple tables. If you want to know more about Join query follow the tutorial.
So we have covered some of the key topics in CodeIgniter tutorial. You are free to check more about codeigniter from the official website of codeigniter. If you have any doubts you can leave comments.