-
Notifications
You must be signed in to change notification settings - Fork 1
/
dashboard.php
98 lines (71 loc) · 1.73 KB
/
dashboard.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
<?php
include 'head2.php';
include "config.php";
$user=$_SESSION["user"];
$sql = "Select * from dashboard where username='$user'";
$result = $conn->query($sql);
?>
<style>
table#passengers {
font-size:16px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
border-spacing: 0;
width: 100%;
}
#passengers td, #passengers th {
border: 1px solid #ddd;
text-align: left;
padding: 8px;
}
#passengers tr:nth-child(even){background-color: #f2f2f2}
#passengers th {
padding-top: 11px;
padding-bottom: 11px;
background-color: #4d4d4d;
color: white;
}
</style>
</head>
<body>
<div style="width:700px; margin:0 auto">
<table id="passengers">
<tbody><tr>
<th>Train Name</th>
<th>Sourse</th>
<th>Destination</th>
<th>Time</th>
<th>Sit</th>
<th>Cost</th>
<th>Acn</th>
<th>Download</th>
</tr>
<?php
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
echo'<tr class="alt">
<td>'.$row["train"].'</td>
<td>'.$row["sourse"].'</td>
<td>'.$row["destination"].'</td>
<td>'.$row["date"].'</td>
<td>'.$row["sit"].'</td>
<td>'.$row["cost"].'</td>
<td>'.$row["ac"].'</td>
<td><a target="_blank" href="download.php?tname='.$row["train"].'&s='.$row["sourse"].'&d='.$row["destination"].'&dt='.$row["date"].'&cost='.$row["cost"].'&sit='.$row["sit"].'">Click Here</a></td>
';
}
}
?>
<!--<tr class="alt">
<td>Amimul Ehshan</td>
<td>Train A</td>
<td>Dhaka</td>
<td>Rajshahi</td>
<td>0800</td>
</tr>-->
</tbody></table>
</div>
<?php
include 'footer.php';
?>