-
Notifications
You must be signed in to change notification settings - Fork 0
/
supplierDetails.php
101 lines (84 loc) · 2.61 KB
/
supplierDetails.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
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?php
// establishing connection
$con = mysqli_connect("localhost" , "root" , "" , "mercado");
if (mysqli_connect_errno()) {
echo "Failed to connect : " . mysqli_connect_error();
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink to fit= no">
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet" href="bootstrap/css/main.css" />
</head>
<body>
<!--navigation bar-->
<?php include 'header.php'; ?>
<div class="container container_main text-center">
<div class="row mt-3">
<div class="col-md-2 list-group-item-dark">
<strong>Name</strong>
</div>
<div class="col-md-2 list-group-item-dark">
<strong>Phone</strong>
</div>
<div class="col-md-2 list-group-item-dark">
<strong>Address</strong>
</div>
<div class="col-md-2 list-group-item-dark">
<strong>Email</strong>
</div>
<div class="col-md-2 list-group-item-dark">
<strong>Username</strong>
</div>
<div class="col-md-2 list-group-item-dark">
<strong>Joinig Date & Time</strong>
</div>
</div>
<?php
global $con ;
$supplier_id = $_GET['id'] ;
$get_sup = "SELECT * FROM supplier where supplier_id = '$supplier_id' ORDER BY joiningTimeAndDate DESC" ;
$run_sup = mysqli_query($con , $get_sup) ;
while ($row_sup = mysqli_fetch_array($run_sup)) {
$supplier_name = $row_sup['supplier_firstName'].' '.$row_sup['supplier_lastName'] ;
$supplier_phone = $row_sup['supplier_phone'] ;
$supplier_address = $row_sup['supplier_address'] ;
$supplier_email = $row_sup['supplier_email'] ;
$supplier_username = $row_sup['supplier_username'] ;
$supplier_joiningTimeAndDate = $row_sup['joiningTimeAndDate'] ;
echo "
<div class='row mt-3'>
<div class='col-md-2 list-group-item-success'>
$supplier_name
</div>
<div class='col-md-2 list-group-item-danger'>
$supplier_phone
</div>
<div class='col-md-2 list-group-item-success'>
$supplier_address
</div>
<div class='col-md-2 list-group-item-danger'>
$supplier_email
</div>
<div class='col-md-2 list-group-item-success'>
$supplier_username
</div>
<div class='col-md-2 list-group-item-danger'>
$supplier_joiningTimeAndDate
</div>
</div>
";
}
?>
</div>
<?php include 'footer.php' ; ?>
<!--scripts-->
<script src="bootstrap/js/jquery.min.js"></script>
<script src="bootstrap/js/popper.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
</body>
</html>