ive ALWAYS had issues with include if i used brackets... try this:
include "functions/connect.php";
include "functions/themename.php";
include "themes/$skin/header.php";
Because include() is a special language construct, parentheses are not needed around its argument.
if your DB connect wasnt loading then it makes sense that the $result isnt a valid resource
also, add this to the top of your page:
// REPORT ALL PHP ERRORS
error_reporting(E_ALL);
so u can see errors