Back

why only 1 row printed? ask about DOMpdf


emodt posted 2 months ago

guys, i have this code. i intend to make whole document printed but only 1 row appear

$query = mysql_query("SELECT *FROM data WHERE id_pembeli>=1");
	$data = mysql_fetch_array($query);
	$id_pembeli = $data['id_pembeli'];
	$luas_l1 = $data['luas_l1']; 
	$luas_l2 = $data['luas_l2']; 
	$kualitas = $data['kualitas']; 
	$estimasi_harga = $data['estimasi_harga']; 
	$jenis = $data['jenis']; 
	$nama_pembeli = $data['nama__pembeli']; 
	$alamat = $data['alamat']; 
	$notelp = $data['notelp']; 
	$lokasi_proyek = $data['lokasi_proyek']; 

	
 
	
	$html =
   '<html><body>' .
    '<h1>Judul </h1>' .
    '<p><table cellspacing="6" cellpadding="6" border="1" style="border-collapse:collapse; border: 1px solid black;width:100%;" >'.
	'<tr><td>id pembeli</td><td>Luas lt1</td><td>Luas lt2</td><td>Kualitas</td><td>Estimasi Harga</td><td>Type Rumah</td><td>Nama Pembeli</td><td>Alamat</td><td>Nomor Telpon</td><td>Lokasi Proyek</td></tr>'.
	'<tr><td>'.$id_pembeli.'</td>'.
	'<td>'.$luas_l1.'</td>'.
	'<td>'.$luas_l2.'</td>'.
	'<td>'.$kualitas.'</td>'.
	'<td>'.$estimasi_harga.'</td>'.
	'<td>'.$jenis.'</td>'.
	'<td>'.$nama_pembeli.'</td>'.
	'<td>'.$alamat.'</td>'.
	'<td>'.$notelp.'</td>'.
	'<td>'.$lokasi_proyek.'</td></tr>'.
	'</table></p>' .
    '</body></html>';

$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream('laporan_'.$id_pembeli.'.pdf');

please help me


Sign in to participate in this thread!



We'd like to thank these amazing companies for supporting us