How to Upload file and Display preview in CakePHP 4

File uploads are a common feature in web applications. It allows users to upload and share files, such as images, videos, and documents.

CakePHP 4 already has built-in File handling classes to handle file uploads.

In this tutorial, I show how you can upload file with validation and display its preview after upload in CakePHP 4.

In the example, I am using the Modelless form for creating an upload form.

How to upload file and display preview in CakePHP 4

Read more

How to Add Toggle button in DataTables with jQuery PHP

Adding pagination on the page becomes easier with the DataTables plugin. It is equipped with essential features such as searching, sorting, and customizable rows per page.

Elevate user interaction by seamlessly integrating action buttons into the list, for these need to update the AJAX script.

In this tutorial, I show how you can add a toggle button to change user status in DataTable AJAX pagination with PHP.

How to Add Toggle button in Datatables with jQuery PHP

Read more

Add and Save CKEditor 5 data to MySQL database with PHP

Ever wished for a text editor that’s more than just basic? Well, meet CKEditor 5, a tool that goes beyond the ordinary. Packed with features to enhance your writing journey, it’s not your average text box.

In this tutorial, I show how you can initialize CKEditor 5 with file upload on the element and save its data to the MySQL database with PHP.

Add and Save CKEditor 5 data to MySQL database with PHP

Read more