how to set it? this is my full code:
<?php
session_start();
$nama =$_SESSION['nama'];
require('fpdf17/fpdf.php');
$connection = mysql_connect("localhost", "root", "");
$db = mysql_select_db("qurban", $connection);
$query = mysql_query("select * from pengguna where nama='$_SESSION[nama]'", $connection);
while($rows=mysql_fetch_array($query))
{
//A4 width : 219mm
//default margin : 10mm each side
//writable horizontal : 219-(10*2)=189mm
$pdf = new FPDF('P','mm','A4');
$pdf->AddPage();
//set font to arial, bold, 14pt
$pdf->SetFont('Arial','B',14);
$pdf->Cell(189,5,'',0,1);//end of line
$pdf->Cell(189,5,'',0,1);//end of line
//Cell(width , height , text , border , end line , [align] )
$pdf->Cell(140,5,'YAYASAN SALAM MALAYSIA',0,0);
$pdf->Cell(69,5,'INVOICE',0,1);//end of line
$pdf->Cell(189,5,'',0,1);//end of line
$pdf->SetFont('Arial','',12);
$pdf->Cell(140,5,'',0,0);
$pdf->Cell(30,5,'No. Rujukan',0,0);
$pdf->Cell(19,5,$rows['id_pengguna'],0,0);
//make a dummy empty cell as a vertical spacer
$pdf->Cell(189,5,'',0,1);//end of line
$pdf->SetFont('Arial','B',12);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,'Pegawai,',0,1);
$pdf->SetFont('Arial','',12);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,'No 22 Jalan Changgai,Pjs9,',0,1);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,'46000,',0,1);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,'Petaling Jaya,',0,1);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,'Selangor.',0,1);
$pdf->Cell(189,5,'',0,1);
//billing address
$pdf->SetFont('Arial','B',12);
$pdf->Cell(100,5,'Bill Kepada',0,1);//end of line
$pdf->Cell(189,5,'',0,1);//end of line
$pdf->SetFont('Arial','B',12);
//add dummy cell at beginning of each line for indentation
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,$rows['nama'],0,1);
$pdf->SetFont('Arial','',12);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,$rows['alamat'],0,1);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,$rows['poskod'],0,1);
$pdf->Cell(10,5,'',0,0);
//$pdf->Cell(90,5,$rows['bandar'],0,1);
$pdf->Cell(10,5,'',0,0);
$pdf->Cell(90,5,$rows['negeri'],0,1);
//make a dummy empty cell as a vertical spacer
$pdf->Cell(189,10,'',0,1);//end of line
$pdf->Cell(138,5,'',0,1);
//invoice contents
$pdf->SetFont('Arial','',12);
$pdf->Cell(189,10,'',0,1);
$pdf->SetFont('Arial','',12);
$pdf->Cell(175,10,'*Sila bawa invoice sebagai bukti tempahan',0,1);
$pdf->Cell(175,10,'*Sebarang masalah atau cadangan sila isi borang aduan di Laman Hubungi Kami ',0,1);
$pdf->Output();
}?>
if i delete the database, pdf will come out...