How to Create Dynamic Dependent Dropdowns with AJAX in CodeIgniter 4

In web applications, auto populating dropdowns are commonly used to simplify user input and ensure data consistency. When a user selects a value from one dropdown, another dropdown with related data is dynamically populated.

Consider this example. Assume we have a global online store and want to allow our customers to filter products by country and city. There could be two dropdowns: one for countries and one for cities. The city dropdown will dynamically change depending on the country selected by the user, displaying only cities in that country. This feature will make it easier for users to select the correct filter, reducing confusion and providing a better user experience.

In this tutorial, I show how you can create dynamic dependent dropdown with MySQL database data using jQuery AJAX in CodeIgniter 4.

How to Create Dynamic Dependent Dropdowns with AJAX in CodeIgniter 4

Read more

Step-by-Step Tutorial on Creating Pagination in CakePHP 4

Pagination is an essential part of web development that allows users to navigate through a large list of data easily. It divides the data into small chunks and displays them in a structured and manageable way.

In CakePHP 4 you don’t need to write lots of code to create a pagination list. For this paginate() method is available that executes from the controller.

In this tutorial, I show how you can create a pagination in CakePHP 4 with MySQL database data.

Step-by-Step Tutorial on Creating Pagination in CakePHP 4

Read more

Dynamic data load on Column Chart using PHP and Google Chart API

Column charts are one of the most common and widely used chart types. It is a visual representation of data that uses bars to show the values of different categories.

Google charts API allows to create different types of charts like – pie, bar, line, column, etc. It takes Array type value as data.

In this tutorial, I show how you can create column chart using Google Chart API and load MySQL data dynamically using PHP with a live example.

Dynamic data load on Column Chart using PHP and Google Chart API

Read more

How to Create a PHP Event Calendar with FullCalendar JS Library

Event calendars are a powerful tool that keeps track of upcoming events, schedules, appointments, and deadlines.

I am using FullCalendar plugin to create a calendar layout and make it dynamic using PHP and MySQL. Plugin is not dependent on any library, responsive, and automatically fits on the page. Different types of options and events are available to customize and control it.

In this tutorial, I show how you can create an event, update and delete an existing event, and load events in the FullCalendar JavaScript library using PHP AJAX and MySQL.

I am using FullCalendar v6 in the example and sweetAlert library to display an alert box to add/edit events.

How to Create a PHP Event Calendar with FullCalendar JS Library

Read more