-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtabletest.php
More file actions
49 lines (44 loc) · 1.48 KB
/
tabletest.php
File metadata and controls
49 lines (44 loc) · 1.48 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
<?php
include_once 'includes/db_connect.php';
include_once 'includes/functions.php';
$gather_table = $mysqli->query("SELECT * FROM Gathering");
//$crafting_table = query_db("SELECT * FROM Crafting", $mysqli);
//$farming_table = query_db("SELECT * FROM Farming", $mysqli);
/*echo $gather_table->field_count;
while ($row = $gather_table->fetch_row())
{
print_r($row);
echo '<br>';
<table id="myTable">
<tr>
<?php
while($field = $gather_table->fetch_field())
{
$field_name = ucfirst($field->name);
echo "<th>$field_name</th>";
}
?>
</tr>
<?php while($row = $gather_table->fetch_row())
{
echo "<tr>";
for ($index = 0; $index < $gather_table->field_count; $index++)
echo "<td>$row[$index]</td>";
echo "</tr>";
}
?>
</table>
}*/
?>
<! DOCTYPE html>
<html>
<head>
<script type="text/JavaScript" src="js/forms.js"></script>
</head>
<body>
<input type="text" id="myInput" onkeyup="searchFilter('myInput','Gathering Table')" placeholder="Search for names..">
<?php GenerateHTMLTable('Gathering',$mysqli);
GenerateHTMLTable('Crafting',$mysqli);
GenerateHTMLTable('Farming',$mysqli); ?>
</body>
</html>