Modification to the above code to make it work. Spelling Errors.
<?php
$con = mysql_connect();
if (!$con) {
die('Server connection problem: ' . mysql_error());
}
if (!mysql_select_db('test', $con)) {
die('Database connection problem: ' . mysql_error());
}
$result = mysql_query('SELECT id, name FROM people', $con);
if (!$result) {
die('Query execution problem: ' . mysql_error());
}
while ($row = mysql_fetch_row($result)) {
echo $row[0] . ': ' . $row[1] . "\n";
}
mysql_free_result($result);
?>