I modified the code and currently, this is working fine. I know its a lame and poor code, but its still doing what it should do.

PHP Code: 
<?php    $id $_GET['id'];
$db mysql_connect($hostname,$username,$password);
if(!
$db){
    echo 
'Failed to connect to database. Check your info';
    }
@
mysql_select_db($database) or die( "Unable to select database");
$query "SELECT * FROM post";
/*$result = mysql_query($query);*/
$result mysql_query($query) or die(mysql_error());
$title mysql_result($result,--$id,"title");
$cover mysql_result($result,$id,"cover");
$info mysql_result($result,$id,"info");

echo 
'ID='.++$id.' - Title='.$title.'';

mysql_close();?>
If anyone can still clean the code and make it efficient, please feel free to do so.