Hi,
I have tried and used the following in an .inc file. I think that's what you mean.
<?php
////////////////////////////////////////////////////////////////
//
// My mysql functions
//
////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////
// log in for mysql to specific database
////////////////////////////////////////////////////////////////
function test_db_connect()
{
$link = mysql_connect ("localhost","yyy","zzz");
if ($link && mysql_select_db ("test"))
return ($link);
return (false);
}
////////////////////////////////////////////////////////////////
// opens html page and sets title and author info
////////////////////////////////////////////////////////////////
function html_begin()
{
echo ("<html>\n");
echo ("<head>\n");
global $ttitle;
echo ("<title> $ttitle </title>\n");
echo ("<meta name='Author' content='Peter'>\n");
echo ("</head>\n");
global $link, $vlink, $leftmargin, $bgcolor;
echo ("<body $link $vlink $leftmargin $bgcolor>\n");
}
////////////////////////////////////////////////////////////////
// sets html header
////////////////////////////////////////////////////////////////
function wp_header()
{
echo ("<center>\n");
echo ("<font face='Verdana,Geneva,Arial,Helvetica,sans-serif' size='+1' color='Teal'>\n");
global $hheader;
echo ("$hheader\n");
echo ("</font></center>\n");
}
Then I prepare the test.php file including the include, some variables, and whatever else I need.
I hope this helps.
Peter