-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDownloadMedicineDetails.php
More file actions
71 lines (38 loc) · 1015 Bytes
/
DownloadMedicineDetails.php
File metadata and controls
71 lines (38 loc) · 1015 Bytes
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
<?php include 'connection.php';?>
<?php
session_start();
if(isset($_SESSION['email']))
{
//echo $_SESSION['email'];
?>
<?php
require("fpdf183/fpdf.php");
$res=mysqli_query($con,"select Mid,MName,MPrice,MStock from storeofmedicine");
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont("Arial","B",17);
$pdf->Cell(0,15,"Medicine Details Report",1,1,'C'); //width height title border new_line center
$pdf->Cell(20,10,"ID",1,0,'C');
$pdf->Cell(50,10,"NAME",1,0,'C');
$pdf->Cell(50,10,"PRICE",1,0,'C');
$pdf->Cell(70,10,"STOCK",1,1,'C');
while($row=mysqli_fetch_array($res))
{
$pdf->Cell(20,10,$row['Mid'],1,0,'C');
$pdf->Cell(50,10,$row['MName'],1,0,'C');
$pdf->Cell(50,10,$row['MPrice'],1,0,'C');
$pdf->Cell(70,10,$row['MStock'],1,1,'C');
}
$pdf->Cell(0,15,"Manage & Organize By:-Name Hospital",1,1,'C');
$pdf->Cell(0,15,"Contatct:-",1,1,'C');
$pdf->output();
?>
<?php
}
else
{
header("location:Login.php")
?>
<?php
}
?>