Simply Create PDF with fpdf Sometimes we need to generate pdf based on mysql database so here is the example of How to create PDF with PHP mysql using FPDF in 2 Steps. Step1 First Download fpdf from Here Step 2 Create an index.php file and paste this code <?php include('../config.php'); require('webroot/fpdf/fpdf.php'); $aClassDb = new ClassDb(); class Getdata { public function all($getPostdata) { $getData = ""; try { $getApartment = $getPostdata['apartid']; $getYear = $getPostdata['invoiceyear']; $startdate = mktime(0,0,0,1,1, $getYear); $enddate = mktime(0,0,0,12,31, $getYear); $query = $aClassDb->getAllData("invoice", "AND appartment='$getApartment' AND date_invoice BETWEEN $startdate AND $enddate"); $getData = $query; /* PDO $db = new PDO('mysql:host=localhost;dbname=test;', 'root'...
PHP,WORDPRESS,CAKEPHP,JQUERY,PHP TUTORIALS,CAKEPHP TUTORIALS,JQUERY CODES, CSS CODES, HTML CODES,EXPO, React, React Native, Angular,OOPS ,PHP INTERVIEW QUESTIONS @shubham715