Run your queries like this -
$sql = "SELECT * FROM `post` WHERE `postid` LIKE $id";
$result = @mysql_query($sql) or die('MySQL error: '.mysql_error().'<br>Query: '.$sql);
At least this way you can see if there is an error in your sql due to a variable not being passed.
Hope this helps 😉