bi de $dbh=mysql_connect ("localhost", "blog", "blog") or die ('I cannot connect to the database because: ' . mysql_error());
satırını
mysql_connect ("localhost", "blog", "blog") or die ('I cannot connect to the database because: ' . mysql_error());

olarak değiştirirmisin.