-
Notifications
You must be signed in to change notification settings - Fork 2
/
show_field.php
48 lines (42 loc) · 1.05 KB
/
show_field.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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
<style type="text/css">
tr.header
{
font-weight:bold;
}
tr.alt
{
background-color: #777777;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$('.striped tr:even').addClass('alt');
});
</script>
<title></title>
</head>
<body>
<?php
$server = mysql_connect("localhost","jshang5","iEXDfQqe");
$db = mysql_select_db("jshang5",$server);
$query = mysql_query("select * from Field");
?>
<table class = "striped">
<tr class = "header">
<td>field</td>
<td>subfield_of</td>
</tr>
<?php
while ($row = mysql_fetch_array($query)){
echo "<tr>";
echo "<td>".$row['field']."</td>";
echo "<td>".$row['subfield_of']."</td>";
}
?>
</table>
</body>
</html>