CODE
<style type="text/css">
<!--
body {
background-image: url(../New%20Website/images/norway.jpg);
}
body,td,th {
color: #0000FF;
}
-->
</style>
<p> </p>
<form id="form1" name="form1" method="post" action="">
<p><br />
<?php
$con = mysql_connect("localhost","root","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("studentdatabase", $con);
$result = mysql_query("SELECT * FROM studentdetails");
echo "<table border='1'>
<tr>
<th>StudentNo</th>
<th>Name</th>
<th>Surname</th>
<th>Gender</th>
<th>Course</th>
<th>Level</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['StudentNo'] . "</td>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Surname'] . "</td>";
echo "<td>" . $row['Gender'] . "</td>";
echo "<td>" . $row['Course'] . "</td>";
echo "<td>" . $row['Level'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
</p>
</form>
Mod edit - Added code tags.