-
Notifications
You must be signed in to change notification settings - Fork 0
/
PersonalJob_Main.php
61 lines (59 loc) · 1.63 KB
/
PersonalJob_Main.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
<?php
session_start();
$connect = mysqli_connect("localhost", "root", "password", "dbtournament");
$TName = $_SESSION["TName"];
$sql = "SELECT * FROM";
$result = mysqli_query($connect, $sql);
?>
<html>
<head>
<title>Export MySQL to Excel</title>
<script type="text/javascript">
$(document).keypress(
function(event){
if (event.which == '13') {
event.preventDefault();
}
});
</script>
</head>
<body>
<div class="container">
<br />
<br />
<br />
<div class="table-responsive">
<h2 align="center">All Debaters of <?php echo "$TName";?></h2><br />
<table class="table table-bordered" style="border-style: 1;">
<tr>
<th>MemberName</th>
<th>TeamName</th>
<th>SchoolName</th>
<th>Novice</th>
<th>FoodPreference</th>
<th>ContactDetails</th>
</tr>
<?php
while($row = mysqli_fetch_array($result))
{
echo '
<tr>
<td>'.$row["MemberName"].'</td>
<td>'.$row["TeamName"].'</td>
<td>'.$row["SchoolName"].'</td>
<td>'.$row["Novice"].'</td>
<td>'.$row["FoodPreference"].'</td>
<td>'.$row["ContactDetails"].'</td>
</tr>
';
}
?>
</table>
<br />
<form method="post" action="PersonalJob_Export.php">
<input type="submit" name="export" class="btn btn-success" value="Export" />
</form>
</div>
</div>
</body>
</html>