Yeah ... as Pinoy points out, you're using OO code, which is fine if you know what you're doing, but your error message shows that you're calling OO code that doesn't exist.
I suggest you use the standard database access code (and tidy up the HTML - you've got an unordered list with one item in it):
<?php
$id = mysql_connect ("mysql_host", "mysql_user", "mysql_password") or die ("Could not connect");
mysql_select_db ("my_database", $id) or die ("Could not select database");
$query = "SELECT name FROM test WHERE id = 4";
$result = mysql_query($query) or die ("Query failed");
print "<ul>";
while ($row = mysql_fetch_array($result)) {
echo "<li>Name is: " . $row['name'] . "</li>";
}
print "</ul><br />";
mysql_free_result($result);
?>
You'll find examples of this at http://www.php.net and also at any PHP site. You can copy and paste, and then change the details. Most good PHP primers also contain an extensive section on MySQL. They usually have an OO section as well, which will exercise your brain power. I still haven't grasped what OO actually is, but there are several articles about it on this site.
Best of luck
Norman