Nope that is not what I mean.
Okay the contents of your header.php file I assume is what you posted above. So instead of that put this
<?
$html = new html;
// Grab the tablewrapper
list($tbopen,$tbclose) = $html -> table_wrapper();
// Send the template
include("$thispath/templates/$tempstyle/header.tmpl");
?>
Then the contents of the header.php file I made into a template and attached the post above. It is just a templated header and if there was any problems with the form tag being in the php file or the way it reads it the template should solve it. You html was not compliant and missing a tag.