-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprintPDF.php
More file actions
75 lines (60 loc) · 1.31 KB
/
Copy pathprintPDF.php
File metadata and controls
75 lines (60 loc) · 1.31 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?php
// Insert the content of connection.php file
require_once 'connection.php';
use Dompdf\Dompdf;
?>
<img src="images/egm.jpg" width="100" height="90">
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
tr:nth-child(even) {
background-color: #dddddd;
}
td.a {
text-align: right;
font-weight: bold;
}
</style>
</head>
<body>
<table width='100%'>
<tr>
<th>ALL RECORDS</th>
</tr>
</table>
<table width='100%'>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
<th>Address</th>
<th>Skills</th>
<th>Designation</th>
<th>Created</th>
</tr>
<?php
$sql = "SELECT * FROM tbl_record";
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_row($result)) {
?>
<tr>
<td><?php echo $row[0] ?></td>
<td><?php echo $row[1] ?></td>
<td><?php echo $row[2] ?></td>
<td><?php echo $row[3] ?></td>
<td><?php echo $row[4] ?></td>
<td><?php echo $row[5] ?></td>
<td><?php echo $row[6] ?></td>
</tr>
<?php
}
?>
</table>