Thank you for using rssforward.com! This service has been made possible by all our customers. In order to provide a sustainable, best of the breed RSS to Email experience, we've chosen to keep this as a paid subscription service. If you are satisfied with your free trial, please sign-up today. Subscriptions without a plan would soon be removed. Thank you!
#ask mastah error ini kenapa y?? ini scriptnya $sql = "SELECT * FROM costumer;"; $hasil = mysql_query($sql, $connect); if (! $hasil) die("Salah SQL"); $pdf=new FPDF(); $pdf->SetAuthor('Penjahit Yati'); $pdf->SetTitle('Daftar Pelanggan'); $pdf->AddPage(); $pdf->SetFont('Arial','B',20); $pdf->Cell(0,0, 'Daftar Pelanggan',0,1,'C'); $pdf->SetLineWidth(1); $pdf->Line(10,30,200,30); while ($baris = mysql_fetch_row($hasil)) { $costumerid = $baris[0]; $costumername = $baris[1]; $costumeraddress = $baris[2]; $telp = $baris[3]; $pdf->Cell(20, 6, $costumerid, 1, 0); $pdf->Cell(40, 6, $costumername, 1, 1); $pdf->Cell(60, 6, $costumeraddress, 1, 2); $pdf->Cell(80, 6, $telp, 1, 3); } // Akhir pembacaan data mysql_close($connect); $pdf->Output(); | |||
error itu artinya, sudah ada output sebelum generate pdf. coba cek $pdf->Output() itu ada 3 option $pdf->Output('yourfilename.pdf','F'); // simpan ke file $pdf->Output('yourfilename.pdf','D'); // paksa user untuk download $pdf->Output('yourfilename.pdf','I'); //ditampilkan di browser | |||
udah pake yg $pdf->Output('yourfilename.pdf','I'); //ditampilkan di browser masih sama errornya padahal $pdf->output() nya cuma 1 | |||
coba query ini bener ga $sql = "SELECT * FROM costumer;"; |
Artupas Ybed 05 Jul, 2013
-
Source: http://www.facebook.com/groups/35688476100/?id=10151736580281101
--
Manage subscription | Powered by rssforward.com
Tidak ada komentar:
Posting Komentar