troubleshooting Question

Generate PDF From FPDF PHP

Avatar of anilpotter
anilpotterFlag for India asked on
13 Comments1 Solution680 ViewsLast Modified:
here is my code i need to input my details how can i insert data from database values in heading and content..
if(!isset($_SESSION['user_id'])) {
header("Location: index.php");

include ('../../includes/dbc.php');
$query="select * from contents where state='1' and (publish_down >= '".date('Y-m-d')."' and publish_up <= '".date('Y-m-d')."') and id='".$_GET['id']."'";
$dataset=mysql_query($query)or die(mysql_error());
class PDF extends FPDF
//Page header
function Header()
      //Arial bold 15
      //Move to the right
      $this->Cell(30,10,Put the title from database?'',0,0,'C');
      //Line break

//Page footer
function Footer()
      //Position at 1.5 cm from bottom
      //Arial italic 8
      //Page number
      $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');

//Instanciation of inherited class
$pdf=new PDF();
$pdf->Cell(0,10,'Put the code from database?',0,1);
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 13 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 13 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros