Advertisement
GWibisono

perhatikan $image = $direc.$data;

Jun 21st, 2012
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.89 KB | None | 0 0
  1. <?php
  2. mysql_connect("localhost","root","123");
  3. mysql_select_db("pengelolaan");
  4. include "pdf/fpdf.php";
  5. $FILE=$_POST['FILE'];
  6. $direc='upload/';
  7. $tgl = date('d-M-Y');
  8.     $pdf = new FPDF();
  9.     $pdf->Open();
  10.     $pdf->addPage();
  11.     $pdf->setAutoPageBreak(false);
  12.     $pdf->setFont('Arial','',12);
  13.         $yi = 60;
  14.         $ya = 55;
  15.     $pdf->setFont('Arial','',9);
  16.     $pdf->setFillColor(222,222,222);
  17.     $pdf->setXY(10,$ya);
  18.     $ya = $yi + $row;
  19.     $sql =
  20.     mysql_query("SELECT `FILE` FROM `tm_spt`
  21.         WHERE `FILE` LIKE '%FILE%'") or die(mysql_error());
  22.     //$i = 1;
  23.     $no = 1;
  24.     $max = 100;
  25.     $row = 20;
  26.     $pdf->setXY(10,$ya);
  27.     $pdf->setFont('arial','',9);
  28.     $pdf->setFillColor(255,255,255);
  29.  
  30. while($data = mysql_fetch_array($sql))
  31. {
  32.     $image = $direc.$data;  //upload/array ???
  33.  
  34.     $pdf->Image($image,1,1,3,3);
  35.  
  36.     $pdf->Ln();
  37.     $ya = $ya+$row;
  38.     $no++;
  39.     //$i++;
  40.     /* $dm[NO_SPT] = $data[NO_SPT];  */
  41. }
  42.  
  43. $pdf->output();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement