-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewlist.php
114 lines (108 loc) · 2.56 KB
/
viewlist.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
102
103
104
105
106
107
108
109
110
111
112
113
114
<?php
//Connect database
include "database/connect.php";
//Read session
include 'session.php';
$uid=$_SESSION['UserID'];
if($uid=='' || $uid==null){
$message="Please login to continue";
echo "<script type='text/javascript'>alert('$message');</script>";
header("Refresh: 0, login_register.php");
}
//Read button script
include "top_button.html";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style type="text/css">
a:hover{
font-size: 24px;
}
a{
color: blue;
}
form{
margin-left: 60px;
margin-top: 15px;
margin-right: 60px;
}
table{
max-width: 1200px;
margin-bottom:50px;
margin-left:auto;
margin-right:auto;
background-color: white;
text-align:center;
}
th{
background-color: #66CDAA;
border:1px solid #66CDAA;
font-size: 18px;
text-align: center;
padding: 5px 10px;
}
td{
border:1px solid black;
font-size: 16px;
font-family: Times New Roman;
padding: 5px 5px;
}
input[type=submit]{
padding: 5px;
color: black;
border: none;
background-color: #66CDAA;
font-weight: 700;
font-family: Times New Roman;
font-size: 18px;
text-align: center;
width: 100px;
}
input[type=submit]:hover{
background-color: #20B2AA;
}
div{
margin: auto;
padding-bottom: 20px;
min-width: 70%;
max-width: 95%;
background-color: white;
}
hr{
border-top: 5px dotted grey;
border-bottom: none;
border-left: none;
border-right: none;
width: 95%;
padding-top: 10px
}
</style>
</head>
<body background="image\bg.png">
<table align="center" cellpadding="20px" cellspacing="6px">
<tr>
<th >UserName</th>
<th >UserEmail</th>
</tr>
<?php
$name =$_POST['viewlist'];
$conn = mysqli_connect($servername, $username, $password, $dbname);
$read_event = "SELECT * FROM user_details INNER JOIN booking_details ON booking_details.EventID = $name AND booking_details.UserID = user_details.UserID ";
$result_read_event = mysqli_query($conn, $read_event);
if(mysqli_num_rows($result_read_event)>0){
while($row = mysqli_fetch_array($result_read_event, MYSQLI_ASSOC)){
echo "<tr>";
echo "<td>".$row['UserFullName']."</td>";
echo "<td>".$row['UserEmail']."</td>";
echo "<tr>";
}
}
?>
</table>
</body>
</html>