-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
54 lines (44 loc) · 1.4 KB
/
index.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
<?php
$title = "Home";
include 'header.php';
include 'DBHelper.php';
include 'db_queries.php';
?>
<div class="container">
<div class="row col-md-12 tBorder">
<table id="dynamicT" name="dynamicT" class="table table-striped display custab table-bordered" cellspacing="0" width="100%">
<thead class="tableH">
<tr>
<th>Character Name</th>
<th>Species Name</th>
<th>Planet Name</th>
</tr>
</thead>
<?php
if (db_connect()) {
$result = db_generic_select($sql_index_char_spec_plan);
$arr_len = count($result);
//echo "The array Length is: " . $arr_len .'<br />';
for ($x = 0; $x < $arr_len; $x++) {
echo "<tr>";
echo "<td>" . $result[$x]['f_name'] ." ". $result[$x]['l_name'] . "</td>";
echo "<td>" . $result[$x]['spec_name'] . "</td>";
echo "<td>" . $result[$x]['plan_name'] . "</td>";
echo "</tr>";
}
} else {
//echo 'Failed!';
//Do a toast or somthing
}
?>
</table>
<script>
$(document).ready(function() {
$('#dynamicT').DataTable();
});
</script>
</div>
</div>
<?php
include 'footer.php';
?>