-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintproforma.php
39 lines (33 loc) · 1.15 KB
/
printproforma.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
<?php
// Include the database connection file
include("./php/database.php");
// Query to select proforma information
$sql = "SELECT * FROM proforma";
$result = $conn->query($sql);
// Check if there are any rows in the result set
if ($result && $result->num_rows > 0) {
// Start building the HTML table to display proforma information
$output = "<table border='1'>
<tr>
<th>Title</th>
<th>Category</th>
<th>Date of Upload</th>
</tr>";
// Loop through each row in the result set
while ($row = $result->fetch_assoc()) {
// Append a new row to the HTML table for each proforma entry
$output .= "<tr>
<td>{$row['TITLE']}</td>
<td>{$row['CATEGORY']}</td>
<td>{$row['Date_of_Upload']}</td>
</tr>";
}
// Close the HTML table
$output .= "</table>";
// Output the HTML table
echo $output;
} else {
// If no proforma entries found, display a message
echo "<p>No proforma entries found.</p>";
}
?>