I have this php file that list the content of a table in a database:
Code: Select all
<html>
<head>
<title>REGNSKAP</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
</style>
</head>
<?php
include './config/config.php';
include './config/opendb.php';
$result = mysql_query("SELECT * FROM Kontoplan")
or die(mysql_error());
echo "<table border='0'>";
echo "<tr> <th>Kontonr</th> <th>Kontonavn</th> <th>Kontotype</th> <th>Saldo</th></tr>";
while($row = mysql_fetch_array( $result )) {
echo "<tr><td>";
echo $row['Kontonummer'];
echo "</td><td>";
echo $row['Kontonavn'];
echo "</td><td>";
echo $row['Kontotype'];
echo "</td><td>";
echo $row['Saldo'];
echo "</td><td></tr>";
}
echo "</table>";
include './config/closedb.php';
?>
</html>