For includes to work they must be in PHP. I am not sure about HTML you can reference a CSS or a JavaScript but with PHP it must be a PHP file. For instance lets say I have all my connection data in the below file;
<?php
$host="localhost";
$user="username";
$password="secret";
$connect=mysql_connect($host.$user,$password)
or die("could not connect to database server. MySQL said: ".mysql_error());
?>
Then when I need this information to connect to the database I just include it like this;
<?php
include("connect.inc.php");
$db=mysql_select_db("mydatabase",$connect)
or die("Could not select the database. MySQL said: ".mysql_error());
$query="SELECT * FROM records WHERE user='aUserName';
//...more code
?>
Now the way PHP will see the above is basically
<?php
$host="localhost";
$user="username";
$password="secret";
$connect=mysql_connect($host.$user,$password)
or die("could not connect to database server. MySQL said: ".mysql_error());
$db=mysql_select_db("mydatabase",$connect)
or die("Could not select the database. MySQL said: ".mysql_error());
$query="SELECT * FROM records WHERE user='aUserName';
//...more code
?>