-
Notifications
You must be signed in to change notification settings - Fork 0
/
layout.html
101 lines (84 loc) · 2.12 KB
/
layout.html
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
99
100
101
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Water Billing System</title>
<style type="text/css">
#wrapper {
background:#333; width:800px; margin:0 auto; }
#header {
background:#000; width:800px; height:100px; }
#lft { background:#0F0; width:400px; height:300px; float:left; }
#ryt { background:#999; width:400px; height:300px; float:right; }
</style>
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="lft"> <p><h1>Costumers Information</h1></p>
<form method="post">
<table width="332" border="0">
<tr>
<td width="332"><input type="hidden" name="id" value="0" /></td>
</tr>
<tr>
<td>Last Name:</td>
<td><input type="text" name="lname" /></td>
</tr>
<tr>
<td>First Name:</td>
<td><input type="text" name="fname" /></td>
</tr>
<tr>
<td>MI:</td>
<td><input type="text" name="mi" /></td>
</tr>
<tr>
<td>Address:</td>
<td><input type="text" name="address" /></td>
</tr>
<tr>
<td>Contact #:</td>
<td><input type="text" name="contact" /></td>
</tr>
<tr>
<td><input type="submit" name="add" value="ADD" /></td>
<td><input type="reset" value="CANCEL" /></td>
</tr>
</table>
</form></div>
<div id="ryt">
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("waterbilling", $con);
$result = mysql_query("SELECT * FROM owners");
echo "<table border='1' bgcolor='#006600'>
<tr>
<th>Id</th>
<th>Firstname</th>
<th>Lastname</th>
<th>Mi</th>
<th>Address</th>
<th>Contact</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['lname'] . "</td>";
echo "<td>" . $row['mi'] . "</td>";
echo "<td>" . $row['address'] . "</td>";
echo "<td>" . $row['contact'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>
</div>
</div>
</body>
</html>