Forum Moderators: coopster
<html>
<head>
<title>Martins telefonbok</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
$db = "telebok";
$table = "telebok_table";
$conn = mysql_connect("localhost") or
die("gick inte att ansluta till databasen");
echo "ansluten till databasen";
mysql_select_db($db) or
die("kunde inte välja database");
echo "du har valt database";
echo "<h2>Telefonbok</h2>";
$query = "select * from $table";
$result = mysql_query($query) or
die(mysql_error());
while ($row = mysql_fetch_array($result));
{
echo " Namn:";
echo $row["namn"];
echo "<br>";
echo "Telenummer";
echo $row["telenr"];
echo "<br>";
echo "Mobilnummer";
echo "<br>";
echo $row["mobilnr"];
echo "Address";
echo "<br>";
echo $row["address"];
echo "Postnummer";
echo "<br>";
echo $row["postnr"];
echo "Postort";
echo "<br>";
echo $row["postort"];
echo "<br><br>";
}
?>
skriv in fler addresser <a href = "telebok.htm">här</a>
</body>
</html>
i get no error mesage but it will not write out anything from mysql but there is things in it