-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlist.php
More file actions
119 lines (89 loc) · 4.21 KB
/
list.php
File metadata and controls
119 lines (89 loc) · 4.21 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Entry Management</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
</head>
<body style="background-image: url(data/img1.jpg) ; background-repeat: no-repeat; height: 100%; font-family: 'Ibarra Real Nova', serif;
/* Center and scale the image nicely */
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed; "><b>
<nav class="navbar navbar-default" style="background-color:rgb(256,256,256,1);" ;>
<div class="container-fluid">
<div class="navbar-header">
<h1>Innovaccer</h1>
</div>
<ul class="nav navbar-nav">
<li><a href="index.html">Checkin</a></li>
<li><a href="checkout.php">Checkout</a></li>
<li><a href="list.php"> List of all customers </a></li>
</ul>
</div>
</nav>
<head>
<title>Entry Management</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<div class="container" style="background-color:rgb(256,256,256,1);">
<center>
<br>
<h4>
</center>
<table class="table table-hover">
<thead>
<tr>
<th>Name </th>
<th>Phone</th>
<th> Check-in time </th>
<th> Host Name </th>
<th> checkout </th>
</tr>
<?php
$servername = "";
$username = "root";
$password = "";
$dbname = "entry";
$conn = mysqli_connect($servername, $username, $password, $dbname) or die(" can't connect to server");
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
echo "";
$sql = "SELECT name, phone,checkout,checkin,checkout,nameh FROM entry ";
// echo $sql2 ;
$result = mysqli_query($conn, $sql);
// echo mysqli_num_rows($result);
$count = 0;
$result = $conn->query($sql);
$row = $result->fetch_assoc();
echo '<tr> </td>'
. '<td>' . $row["name"] . "</td> <td> " . $row['phone'] . "</td> <td> " . $row['checkin'] . "</td> <td> " . $row['nameh'] . "</td> <td> " . $row['checkout'];
echo "<br>";
while ($row = $result->fetch_assoc()) {
$count++;
if (1) {
echo '<tr> '
. '<td>' . $row["name"] . "</td> <td> " . $row['phone'] . "</td> <td> " . $row['checkin'] . "</td> <td> " . $row['nameh'] . "</td> <td> " . $row['checkout'];
echo "<br>";
}
}
echo '</table>';
?>
<h3 style="color:red;"> 0 in check-out indicates that user has not checked-out yet.</h3>
</h4>
</div>
</form>
</div>
</body>
</html>