-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDetails.php
More file actions
72 lines (66 loc) · 2.15 KB
/
Copy pathDetails.php
File metadata and controls
72 lines (66 loc) · 2.15 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
<?php
session_start();
include ('nav.php');
include ('db.php');
$userid=$_GET['Customer'];
$sql="SELECT fullname FROM users WHERE id='$userid'";
$result = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($result);
$username=$row['fullname'];
echo $username;
echo $username;
$dql2 = "SELECT * FROM order_new WHERE Name='$username'";
$result2 = mysqli_query($conn, $dql2);
// Check if the query for $result2 returns any results
// if (mysqli_num_rows($result2) > 0) {
// $row2 = mysqli_fetch_assoc($result2);
// $address = $row2['Address'];
// echo $address;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
td{
font-size:16px;
}
</style>
</head>
<body>
<div class="container" style="margin-top:200px; margin-left:400px;">
<table border="2" style="padding:10px;">
<thead>
<tr>
<th>Name</th>
<th>Username</th>
<th>Email</th>
<th>Phone</th>
<th>Address</th>
</tr>
</thead>
<tbody>
<?php
if (mysqli_num_rows($result2) > 0) {
while ($row2 = mysqli_fetch_assoc($result2)) {
?>
<tr>
<td><?php echo $row2['Name']; ?></td>
<td><?php echo $row2['Address']; ?></td>
<td><?php echo $row2['Phone']; ?></td>
<td><?php echo $row2['Phone']; ?></td>
<td><?php echo $row2['SelectedItem']; ?></td>
</tr>
<?php
}
} else {
echo "<tr><td colspan='8'>No records found</td></tr>";
}
?>
</tbody>
</table>
</div>
</body>
</html>