-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtopdf.php
48 lines (45 loc) · 936 Bytes
/
topdf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
$id = $_POST['idpesan'];
$nama = $_POST['username'];
$namapaket = $_POST['namapaket'];
$harga = $_POST['hargapaket'];
$tanggal = $_POST['tanggal_mulai'];
require_once("dompdf/dompdf_config.inc.php");
$html =
'<html><body>'.
'<h1>BUKTI PEMBAYARAN PAKET</h1>'.
'<table>'.
'<tr>'.
'<td>Id Pemesanan</td>'.
'<td>:</td>'.
'<td>'.$id.'</td>'.
'</tr>'.
'<tr>'.
'<td>Nama Pemesan</td>'.
'<td>:</td>'.
'<td>'.$nama.'</td>'.
'</tr>'.
'<tr>'.
'<td>Nama Paket</td>'.
'<td>:</td>'.
'<td>'.$namapaket.'</td>'.
'</tr>'.
'<tr>'.
'<td>Harga Paket</td>'.
'<td>:</td>'.
'<td>'.$harga.'</td>'.
'</tr>'.
'<tr>'.
'<td>Tanggal Pesan</td>'.
'<td>:</td>'.
'<td>'.$tanggal.'</td>'.
'</tr>'.
'<tr>'.
'<td>Pemesanan ini telah dikonfirmasi</td>'.
'</tr>'.
'</body></html>';
$dompdf = new DOMPDF();
$dompdf->load_html($html);
$dompdf->render();
$dompdf->stream('bukti_bayar_'.$nama.'.pdf');
?>