HamdanNur

laporan

Jan 4th, 2018
2,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. <?php
  2. // memanggil library FPDF
  3.  
  4.  
  5. require('fpdf181/fpdf.php');
  6. // intance object dan memberikan pengaturan halaman PDF
  7. $pdf = new FPDF('l','mm','A5');
  8. // membuat halaman baru
  9. $pdf->AddPage();
  10. // setting jenis font yang akan digunakan
  11. $pdf->SetFont('Arial','B',16);
  12. // mencetak string
  13. $pdf->Cell(190,7,'FORMULIR PENERIMAAN MAHASISWA BARU',0,1,'C');
  14. $pdf->SetFont('Arial','B',12);
  15. $pdf->Cell(190,7,'STMIK SUMEDANG',0,1,'C');
  16.  
  17. // Memberikan space kebawah agar tidak terlalu rapat
  18. $pdf->Cell(10,7,'',0,1);
  19.  
  20. $pdf->SetFont('Arial','B',10);
  21. $pdf->Cell(20,6,'NIM',1,0);
  22. $pdf->Cell(85,6,'NAMA result',1,0);
  23. $pdf->Cell(27,6,'NO HP',1,0);
  24. $pdf->Cell(25,6,'TANGGAL LHR',1,1);
  25.  
  26. $pdf->SetFont('Arial','',10);
  27.  
  28. include 'koneksi.php';
  29. include "cek-login.php";
  30. $result = mysql_query("select * from daftar WHERE email = '$_SESSION[email]'");
  31. while ($row = mysql_fetch_array($result)){
  32. $pdf->Cell(20,6,$row['id_daftar'],1,0);
  33. $pdf->Cell(85,6,$row['nama_lengkap'],1,0);
  34. $pdf->Cell(27,6,$row['gender'],1,0);
  35. $pdf->Cell(25,6,$row['prodi'],1,1);
  36. }
  37.  
  38. $pdf->Output();
  39. ?>
Advertisement
Add Comment
Please, Sign In to add comment