Display Image From MySQL Using PHP

Blob Data as Image Here I am going to show you an example how you can fetch blob (Binary Long Object) type data from MySQL database and display as image on the web page. Before you display the blob data from MySQL server make sure you had stored the blob data for an image only otherwise it won’t show on…

Save File In MySQL Database Using PHP

Storing File in MySQL Storing file content in database is always a debate and there are certain pros and cons about it. Most of the applications generally store files in a physical location and file metadata are stored in the database. But in certain situation where you find it more beneficial to store files into the database itself. Generally when…

Design Of Frontend And Backend In CodeIgniter 4

Codeigniter 4 Frontend and Backend In this tutorial I am going to give you an idea how to build frontend and backend functionalities separately so that the future maintenance would be easier. Frontend generally accessed by the end users of the websites whereas, backend is used by mainly admin users who manage different functionalities of the website. The backend admin…

Codeigniter 4 MySQL AJAX CRUD Example

Codeigniter 4 CRUD In this tutorial I am going to show how to build CRUD (Create Read Update Delete) application using Codeigniter 4 and MySQL database using basic AJAX (Asynchronous JavaScript and XML) technique. I won’t use AJAX technique for all four operations, i.e., fetching (Read), saving (Create), updating and deleting. Out of these four operations, I will use AJAX…

CodeIgniter 4 REST API JWT Authentication

Table of Contents Introduction Prerequisites Project Directory MySQL Table Database Configuration Route Configuration Model Controller Library Testing CodeIgniter 4 REST JWT Source Code Introduction In this example I will show you how to use JWT (JSON Web Token) in CodeIgniter 4 REST API for authenticating/authorizing a user when he/she is trying to access REST API. A user must register in…

Pretty Print JSON In PHP

Table of Contents Introduction Why do you need to pretty print JSON data? Prerequisites Pretty Print JSON Source Code Introduction Here in this example I am going to show you how to pretty print JSON in PHP program. I will use three different kind of JSON inputs to prettify them in the output. I am going to show you how…

CodeIgniter 4 MongoDB CRUD Example

Table of Contents Introduction Prerequisites CRUD Application Using CodeIngiter 4 and MongoBD MongoDB Config MongoDB Library Model Class Controller Class Views List Records Style Create Record Update Record Route Config Testing CodeIgniter 4 MongoDB CRUD Example Source Code Introduction In this example I am going to build CodeIgniter 4 MongoDB CRUD example. CRUD is an acronym and stands for Create,…

Codeigniter 4 AJAX MySQL Multiple Rows Deletion

Multiple Rows Deletion Here I am going to build an example on how to select multiple rows from HTML table and delete these multiple selected table rows from MySQL database using CodeIgniter 4 with the help of AJAX technique in jQuery. In this tutorial I am going to fetch all records from the MySQL database and displaying on an HTML…

PHP Consume External REST APIs

Introduction In this PHP example, I am going to show you how to call external REST APIs in PHP programming. I am not going to build here any new REST API, but I will call or consume those REST APIs which are already available for testing purpose. But if you want to know then you can check my tutorial about…

PHP Large File Download in Chunks

Introduction Here in this tutorial example, I will show you how to download large file in PHP program. Generally, when you download a file, your file is stored into file system or you load it into memory as a byte array. This is not a problem when you deal with a small file but when you download a large file…