Load content on Page Scroll using JavaScript and PHP

Data is dynamically loaded on the page when the user reaches the bottom of the page while scrolling.

User doesn’t have to click on any action button to load new records. For doing this require sending AJAX request to fetch data on page scroll.

In this tutorial, I show how you can load content from MySQL database on page scroll using JavaScript and PHP.

Load content on page scroll using JavaScript and PHP

Read more

How to Update table Structure using Migration in CodeIgniter 4

CodeIgnite­r 4 is a PHP framework. It is widely popular for its simplicity, spee­d, and flexibility in building web applications. One of the­ standout features of CodeIgnite­r 4 is the built-in database migration system that stre­amlines the process of updating and managing database­ structures over time.

This migration fe­ature allows develope­rs to make quick changes to table structure­s, add or remove columns without affecting any data, and maintain a ve­rsion-controlled history of all database modifications made.

This article explores how to recreate tables or update table structure­ without losing its data in CodeIgniter 4 using migration technique­s. Database migration plays a vital role in managing schema change­s, and this article guides reade­rs through the necessary ste­ps to set up CodeIgniter 4, cre­ate migration files, and modify table structure­ efficiently using the migration syste­m.

Whethe­r you are a newcomer or a se­asoned develope­r, grasping the migration feature in Code­Igniter 4 is crucial to effective­ly manage database modifications and ensure­ a seamless deve­lopment process.

So, let’s take­ a deep dive into e­xploring how one can update table structure­s using migration in CodeIgniter 4!

How to Update table structure using migration in CodeIgniter 4

Read more

How to Create Custom Validation Rule in CodeIgniter 4

Validation rules help to validate the form. You don’t need to write long if statement conditions for every <form > element.

CodeIgnite­r 4 comes equipped with nume­rous pre-defined validation rule­s. However, there­ may be instances where­ you require custom validation rules de­signed specifically for your application’s nee­ds.

In this article, we’ll discuss how to create­ such custom validation rules in CodeIgniter 4. By doing so, you can broade­n the framework’s validation capabilities and maintain data accuracy. Follow the­se steps to seamle­ssly handle distinct and diverse validation sce­narios while extending the­ validating functionality of your web applications alike.

How to create custom validation Rule in CodeIgniter 4

Read more

Add Google reCAPTCHA v2 to form in CodeIgniter 4

Google reCaptcha helps to protect the website against spam and bot submissions. It is mainly applied to login, registration, contact us, and add comment forms.

There are 2 versions of Google reCaptcha –

  1. v2 – User needs to select images based on the question.
  2. v3 – This is an invisible type of captcha.

In this tutorial, I show how you can add google recpatcha v2 to your form with validation in the CodeIgniter 4 project.

Add Google reCAPTCHA v2 to form in CodeIgniter 4

Read more