-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocess_form.php
More file actions
40 lines (33 loc) · 1.18 KB
/
Copy pathprocess_form.php
File metadata and controls
40 lines (33 loc) · 1.18 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
<?php
include('sessionCheck.php');
// Include the FPDF library
require_once('fpdf.php');
// Collect form data
$projectName = $_POST['projectName'];
$location = $_POST['location'];
$clientName = $_POST['clientName'];
$inspectionDate = $_POST['inspectionDate'];
$installationDescription = $_POST['installationDescription'];
$installationType = $_POST['installationType'];
$mainSupplier = $_POST['mainSupplier'];
$r1rt = $_POST['r1rt'];
$insulationResistance = $_POST['insulationResistance'];
// Add more fields as needed
// Create PDF
$pdf = new FPDF();
$pdf->AddPage();
// Add content to the PDF
$pdf->SetFont('Arial', 'B', 16);
$pdf->Cell(0, 10, 'Schedule of Test Report', 0, 1, 'C');
$pdf->Ln(10);
// Add other content and styling as needed
$pdf->SetFont('Arial', '', 12);
$pdf->Cell(0, 10, 'Project Name: ' . $projectName, 0, 1, 'L');
$pdf->Cell(0, 10, 'Location/Address: ' . $location, 0, 1, 'L');
$pdf->Cell(0, 10, 'Client Name: ' . $clientName, 0, 1, 'L');
$pdf->Cell(0, 10, 'Date of Inspection: ' . $inspectionDate, 0, 1, 'L');
$pdf->Ln(10);
// Repeat similar sections for other form data...
// Output the PDF to the browser or save to a file
$pdf->Output('ScheduleOfTestReport.pdf', 'F');
?>