Repository navigation
Expand file tree
/
Copy pathclientDetails.php
More file actions
156 lines (131 loc) · 3.54 KB
/
Copy pathclientDetails.php
File metadata and controls
156 lines (131 loc) · 3.54 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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Details</title>
</head>
<style>
*{
margin: 0;
padding: 0;
font-family: sans-serif;
}
body{
height: 100vh;
background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.4));
background-position: center;
background-size: cover;
overflow-x: hidden;
position: relative;
}
header{
display: flex;
width: 90%;
margin: auto;
height: 10vh;
margin: auto;
align-items: center;
margin-top: 20px;
}
.logo-container, .nav-link, .cart{
display: flex;
}
.nav-link{
justify-content: space-between;
list-style: none;
display: inline-block;
padding: 20px 25px;
}
.nav-link{
flex: 1;
}
nav ul{
margin-right: 50px;
display: inline;
}
.nav-link a{
text-decoration: none;
font-size: 13px;
color: black;
}
.nav-link a::after{
content: '';
width: 0;
height: 2px;
background: rgb(240, 127, 35);
display: block;
margin: auto;
transition: .5s;
}
.nav-link a:hover::after{
width: 100%;
}
.logo-container{
width: 135px;
}
nav{
padding-right: 100px;
}
.btn{
margin-top: 10px;
padding: 10px 20px;
border: 0;
background: rgba(73, 141, 187, 0.938);
font-weight: bold;
cursor: pointer;
margin-left: 950px;
}
.btn:hover{
background: rgb(240, 127, 35);
transition: all 0.3s ease 0s;
}
.deets{
background-color: rgb(0,0,0,0.5);
color: white;
width: 400px;
padding-left: 20px;
margin-left: 250px;
padding-top: 10px;
padding-bottom: 10px;
line-height: 33px;
}
</style>
<header>
<div class="logo-container">
<img src="images/logo2.png" style="width: 135px;">
</div>
<nav>
<ul>
<li class="nav-link"><a href='home1.html'></a></li>
<li class="nav-link"><a href='newabout.html'></a></li>
<li class="nav-link"><a href='help.html'></a></li>
</ul>
</nav>
<div class="cart">
<button type="button" class="btn"><a href="maintainClient.php" style="text-decoration: none; color: black;">BACK</a></button>
</div>
</header>
<body>
<h1 style="color: rgb(240, 127, 35); padding-left: 200px; padding-top: 50px; font-size: 45px;">Details</h1>
<br>
<?php
$id = $_REQUEST['id'];
require_once("config.php");
$conn = mysqli_connect(SERVERNAME, USERNAME, PASSWORD, DATABASE) or
die("<p style=\" color: red;\">Couldn't connect to the database, check your credentials!</p>");
$query = "SELECT * FROM teamvelox.client where clientId = $id";
$result = mysqli_query($conn, $query) or
die("<p style=\" color: red;\> ERROR: Couldn't execute query!</p>");
while($row = mysqli_fetch_array($result)){
echo "<div class=\"deets\">";
echo "<h3>" . $row['firstName'] . " " . $row['lastName'] . "</h3>" . "<br>";
echo "<strong>Contact Number: </strong>" . $row['contactNumber'] . "<br>";
echo "<strong>Email Address: </strong>" . $row['emailAddress'] . "<br>";
}
echo "</div>";
mysqli_close($conn);
?>
</body>
</html>