How to Generate PDF from Mysql Database using PHP

Generate PDF from mysql database

In this post I will explain you How to Generate PDF from Mysql Database using PHP. To Generate PDF file with mysql data content and output, we will use popular php library FPDF which will help us to generate PDF file. What is FPDF ? FPDF is a PHP class library which allow us to generate PDF file using PHP. In FPDF, ‘F’ stands for Free. So We can say FPDF  means Free PDF . It is Open Source library. You may use it  and modify for any kind of usage to…

Read More

How to Import MySQL Database from SQL File using PHP

Importing SQL script via programming will be useful when we need to create database structure dynamically. For example, if we provide APP or plugin to download and install from online, the dynamic SQL import will be used to setup the application database at the time of installing the APP or plugin. To import SQL file in the database, you have to login to your hosting server or phpMyAdmin. Also, you can import the database from PHP script without login to your hosting server or phpMyAdmin. Import database from PHP script…

Read More

How to Create Dynamic Category Subcategory Tree using PHP and MySQL

category-subcategory-tree-dropdown

Category and subcategory tree view structure gives an easy to use approach to list the parent and child categories. The category and their subcategory are effectively isolated by a tree structure. The categories tree view is constantly recommended to display a boundless level of categories and subcategories. In this instructional exercise, we will show you industry standards to make dynamic category subcategory tree using PHP and MySQL. The recursive category tree is extremely helpful to list n level categories in a dropdown. The code help you to make n level…

Read More

How to write connection class to mysql database using php

Hello! In this post, you will learn to how to write and test the OOP based connection class to mysql database using php. see below..how to do it.. connection.php

Now you have create the database connection class let’s see how to call this connection class inside your project. To test the connection we will create another php file and create a object from my existing connection class.. see below..how to do it.. >test.php

Read More

How to create pagination using PHP and MYSQL

Paging (Pagination) means showing Database results in multiple pages instead of one long page. if we have more than 100 records in database and we want to show all results but not in a single page, so we can devide this results into many pages. MySQL helps to generate paging by using LIMIT clause which will take two arguments. First argument as OFFSET and second argument how many records should be returned from the database. Below is a simple code to fetch records using LIMIT clause to generate paging.

Read More