For debugging purposes, perhaps you should change it to:
<?php
$connection = mysql_connect("localhost", "root") or die(mysql_error());
mysql_select_db("people", $connection) or die(mysql_error());
$query = "SELECT customerID, surname FROM customer";
$result = mysql_query($query) or die(mysql_error());
while ($row = mysql_fetch_assoc($result))
{
print $row["customerID"];
print "=="; //print 2 equals signs
print $row["surname"]. "<br>";
}
though since the loop is entered I doubt there is a database error. Specifying the column names might help in case there is a discrepancy.