REST API CRUD Example in CodeIgniter 4 Framework

Here I am going to show you how to build REST web services in PHP based Codeigniter 4 framework. CodeIgniter 4 is the upcoming version of the framework and it is still under development, intended for use with PHP 7.2 or higher version. REST is an acronym that stands for Representational State Transfer (RESTful), which is an architectural style for…

Generate HTML Table From MySQL Database Using Codeigniter

Introduction Here is an example showing you how to generate HTML table from MySQL database using Codeigniter. I will write here an example to create a table using CodeIgniter 3 framework from a multi-dimensional array. The CodeIgniter’s Table class provides functions that enable you to auto-generate HTML table data from arrays or database result sets. In this example, I will…

Username availability check using Codeigniter, AJAX and MySQL

Introduction This tutorial will show you how you can check username availability using Codeigniter, AJAX and MySQL. Sometimes we need to check username availability instantly before a user presses the submit button after filling a long-sized signup form. In this case we can use AJAX technique with any server side technologies like PHP, Codeigniter, Servlet, Struts, JSF, Spring etc. for…

Multi-Step Registration Form Using Codeigniter, MySQL, jQuery

Table of Contents Introduction Prerequisites Project Directory MySQL Table Configuring Autoload Configuring Database Model Class Controller Class View File Configuring Route Testing Multi Step Form Source Code Introduction Here you will see example on multi-step registration form using Codeigniter 3, MySQL, jQuery. Here I will insert data into database using multi-step registration step. Sometimes you may need to capture lots…

Google Column Chart Using Codeigniter

Google Column Chart You might know that Google chart basically displays different statistical data on different chart types such as column chart, bar chart, line chart, pie chart etc. You can integrate Google chart with any server side technology but here I will show you how to integrate Google column chart with Codeigniter. This tutorial shows step by step so…

Codeigniter Join Example

Introduction In this tutorial I will show you CodeIgniter join example. I will use CodeIgniter’s Query Builder Class to build join queries for fetching data from multiple tables. The SQL Join clause is used to combine records together from two or more tables in a database. A Join locates related column values in two or more tables. This will display…

Prevent SQL Injection in Codeigniter

Introduction This tutorial will show you how to prevent SQL injection in Codeigniter application. It is very important to escape the variable you pass to the database query because, in web application security, SQL injections play an important role. SQL injection is: a malicious code injection technique that may destroy your database. one of the most common web hacking techniques….

File upload example in Codeigniter 2.1.4

File upload example in Codeigniter 2.1.4. There is file upload class, in codeigniter, which permits you to upload the file or files. This class also permits you to set various preferences such as destination where the file will be uploaded, restrition on file types, restriction on file size, whether a file name should be encrypted or not, maximum length of…