Parse errors do not have to be specifically on the line it says.
The problem here is that you forgot the semi-colon behind line #6:
PHP Code:
$result = mysql_query("SELECT * FROM cds")
'Unexpected XX' errors are mostly triggered due to a forgotten semi-colon, bracket or comma.
Just backtrack from the line it said (or word, here T_WHILE) and you'll find it most of the time.
So the code will become:
PHP Code:
<?php
mysql_connect("localhost","root","root");
mysql_select_db("cdcol");
$result = mysql_query("SELECT * FROM cds");
while ($row = mysql_fetch_assoc($result))
{
echo $row["titel"];
}
?>