DJMaze,
The following code doesn't work, nothing gets display from the database.
Why is this?
Code:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("WB", $con);
$result = mysql_query("select * from Birds");
// alternatively, you could use mysql_fetch_assoc if you wanted
// the array to be keyed by the field name
while ($array = mysql_fetch_assoc($result))
{
echo $array[0]['Name'];
}
?>
Many Thanks,