Dynamically load data in Select2 with AJAX PDO and PHP

Select2 is a widely used jQuery plugin. It makes select element user-friendly.

After initializing it adds style and a search box. Based on the search text it filters the options.

It allows loading data dynamically using jQuery AJAX.

In this tutorial, I show how you can initialize select2 plugin and load data dynamically using AJAX PDO and PHP.

Dynamically load data in select2 with AJAX PDO and PHP

Read more

How to Auto populate dropdown with AJAX PDO and PHP

With Autopopulating dropdowns user is restricted to select an option from the dropdown step by step. Based on the dropdown selection next dropdown is autofill with options.

A common example, of this, is country, state, and city dropdowns on a form.

To load data without page refresh need to use jQuery AJAX.

In this tutorial, I show how you can auto-populate the dropdown with PDO and PHP.

How to auto populate dropdown with AJAX PDO and PHP

Read more

Filter records by Date range with Vue and PHP

Date range filter without datepicker sometimes gets complex and there is always a possibility that the user specifies the date in a different format. In this case, need to handle it either on the client-side or server-side script.

By allowing datepicker the user only needs to pick a date in a given format.

Date filter helps to generate a report and view records between specific dates.

To add datepicker I am using datepicker Vue component in the example.

In this tutorial, I show how you can filter records by date with Vue.js and PHP.

Filter records by date range with VueJS and PHP

Read more

DataTables AJAX pagination with Custom filter in CodeIgniter 3

DataTables by default comes with a search filter that can be used to search on all fields or specific fields and display records.

Sometimes, require to add the filter for the particular field only like – adding date range filter, country filter, etc.

DataTables allow for passing data that can read at the server-side script.

In this tutorial, I show how you can add a custom search filter and get records using DataTables in CodeIgniter 3.

DataTables AJAX pagination with Custom filter in CodeIgniter 3

Read more