我想从数据库中检索特定销售人员的数据,并使用以下代码下载在 pdf file.im 中检索的数据,它仅显示页面的结构和页面的标题,而不是我想要的表格中的详细信息。任何人帮助我
这是代码:
<?php
include "test4.php";
include('fpdf/fpdf.php');
$pdf=new FPDF();
//Creating new pdf page
$pdf->AddPage();
$pdf->SetRightMargin(50);
$margin;
// Insert a logo in the top-left corner at 300 dpi
$pdf->Image('images/logo7.png',5,5,-100);
// Insert a dynamic image from a URL
$pdf->Ln(20);
$pdf->Ln();
//Set the base font & size
$pdf->SetFont('Arial','B',18);
$pdf->Cell(200,5,"Booth Sales Reports",0,0,'C');
//Creating new line
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont('Arial','i',12);
$pdf->Cell(40,10,"Company Name",0,'C');
$pdf->Cell(40,10,"Contact Person",0,'C');
$pdf->Cell(40,10,"Booth Number",0,'C');
$pdf->Cell(40,10,"Phone Number",0,'C');
$pdf->Cell(30,10,"Date",0,'C');
$pdf->Ln();
$pdf->Cell(200,-2,"__________________________________");
// Fetch data from table
$c=$_SESSION['user'];
$result=mysql_query("SELECT `company_name`, `contact_person`, `phone_number`, `booth_number`, `date` FROM `registration1` where 'sold_by' ='$c' ");
while($row=mysql_fetch_array($result))
{
$pdf->Cell(40,5,"{$row['company_name']}",1,0,'C');
$pdf->Cell(40,5,"{$row['contact_person']}",1,0,'C');
$pdf->Cell(40,5,"{$row['phone_number']}",1,0,'C');
$pdf->Cell(40,5,"{$row['booth_number']}",1,'C');
$pdf->multiCell(30,5,"{$row['date']}",1,'C');
}
$pdf->Output();
?>
这个编码什么也没显示