Generate Excel Report from MySQL Database using Codeigniter

Here we will see how to generate excel report from MySQL database using Codeigniter. Codeigniter is one of the popular PHP framework for web applications and it’s easy to work with Codeigniter for building web applications.

Why excel reporting?

Most people in your organization are likely to be familiar with excel, hence it ensures a short (or nonexistent) learning curve during implementation.

It allows you to use templates and formulas to aggregate data.

It has very easy-to-use charting functionality compared to other software, and several helpful built-in features.

It is also great because you have the ability to cut and paste into reports. Most people write reports in Word, so it’s easy to cut and paste data or charts from Excel into Word.

Here we will create a web application to generate excel report from MySQL database using Codeigniter.

We will create a table in MySQL database and retrieve the records from the table and display on a web page in table format. We will provide a hyper link to generate the excel file from the table data. You will be given a popup asking to save the generated excel file. Then you can choose your convenient location for saving the file.

Continue reading “Generate Excel Report from MySQL Database using Codeigniter”

Generate PDF Report from MySQL Database using Codeigniter

Here we will see how to generate pdf report from MySQL database using Codeigniter. Codeigniter is one of the popular PHP framework for web applications.

PDF format reports allows professionals to edit, share, collaborate and ensure the security of the content within digital documents.

Reports are mostly generated in PDF format because a PDF file is a “read only” document that cannot be altered without leaving an electronic footprint whereas other formats like image, word, excel etc. can easily be altered without leaving an electronic footprint.

PDF files are compatible across multiple platforms whereas a word document may not be viewable easily in Mac system.

Here we will create a web application to generate report from MySQL database using Codeigniter. We will create a table in MySQL database and retrieve the records from the table and display on a view in table format. We will provide a hyper link to generate the PDF from the table data. You will be given a popup asking to save the generated pdf file. Then you can choose your convenient location for saving the file.

Continue reading “Generate PDF Report from MySQL Database using Codeigniter”

Generate HTML Table from MySQL database using Codeigniter

Here is an example showing you how to generate HTML table from MySQL database using Codeigniter. We will write here an example to create a table from a multi-dimensional array. The Table Class provides functions that enable you to auto-generate HTML tables from arrays or database result sets.

Here we will create a web application to generate HTML table from MySQL database using Codeigniter. We will create a table in MySQL database and retrieve the records from the table and display on a view in table format.

Continue reading “Generate HTML Table from MySQL database using Codeigniter”

Search AutoComplete using Codeigniter jQuery

Here in Codeigniter jQuery AutoComplete example we will see how to do search AutoComplete using Codeigniter jQuery.  Autocomplete allows you to easily create autocomplete and auto-suggest boxes for text input fields. When you start a search on Google or other search engines, you can find the information you are looking for using search predictions. Search predictions are possible search terms you can use that are related to the terms you are typing and what other people are searching for.

Autocomplete is a feature in which an application predicts the rest of a word a user is typing. In graphical user interfaces, users can typically press the tab key to accept a suggestion or the down arrow key to accept one of several.
Autocomplete speeds up human-computer interactions when it correctly predicts the word a user intends to enter after only a few characters have been typed into a text input field. The autocomplete is a normal text input enhanced by a panel of suggested options.

Continue reading “Search AutoComplete using Codeigniter jQuery”

Username availability check using Codeigniter, AJAX and MySQL

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 checking whether the input username is avaialable for creating new user account or it has already been taken by someone else. So if we give instant result to the user for username availability then sometimes it makes more sensible than while pressing the submit button and goes top of the signup form to rectify the username input field if input username is not available. So after finishing this example “username check availability using Codeigniter, AJAX and MySQL” you will be able to apply the same logic to any server side technologies.

Continue reading “Username availability check using Codeigniter, AJAX and MySQL”

Multi-step Registration form using Codeigniter, MySQL, jQuery

Sometimes we need to capture lots of user details during registration process and as a result we got long forms on web page. So the best solution is to break the form into smaller logical section and present it into a multi-step registration form. This type of mult-step registration form always improves usability on web page comparing to very long form.

I am going to explain how to convert very long form into multi-step registration form using Codeigniter, MySQL and jQuery.

Continue reading “Multi-step Registration form using Codeigniter, MySQL, jQuery”

AngularJS Codeigniter REST CRUD Example

In this Codeigniter AngularJS CRUD example, we will see the integration of AngularJS with Codeigniter REST. We are going to create CRUD application using Codeigniter REST API on server side and AngularJS is encapsulated within PHP file on client side. Thus the client will communicate with server asynchronously using AngularJS $http service.

Please read the following tutorials before reading this tutorial

Working with RESTful services in Codeigniter – GET example

Working with RESTful services in Codeigniter – POST example

Working with RESTful services in Codeigniter – PUT example

Working with RESTful services in Codeigniter – DELETE example

Continue reading “AngularJS Codeigniter REST CRUD Example”

Working with RESTful services in Codeigniter – DELETE example

In this tutorial I am going to show you how we can work with RESTful or REST webservice in Codeigniter framework.

You may also be interested in Working with RESTful services in Codeigniter – GET example, Working with RESTful services in Codeigniter – POST example  and Working with RESTful services in Codeigniter – PUT example

Introduction

The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects:

The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>.
The MIME type of the response data supported, which are JSON/XML/TEXT/HTML etc.
The set of operations supported by the service. (for example, POST, GET, PUT or DELETE). Continue reading “Working with RESTful services in Codeigniter – DELETE example”

Working with RESTful services in Codeigniter – PUT example

In the tutorial, working with restful services in codeigniter – put example, I am going to show you how we can work with RESTful or REST webservice in Codeigniter framework.

You may also like the Working with RESTful services in Codeigniter – POST example,  Codeigniter GET example with REST service and Working with RESTful services in Codeigniter – DELETE example

Introduction

The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. A RESTful Web service is implemented using HTTP and the principles of REST. Typically, a RESTful Web service should define the following aspects:

The base/root URI for the Web service such as http://<host>/<appcontext/contextpath>/<url pattern>/<resources>.
The MIME type of the response data supported, which are JSON/XML/TEXT/HTML etc.
The set of operations supported by the service. (for example, POST, GET, PUT or DELETE). Continue reading “Working with RESTful services in Codeigniter – PUT example”