Page Break Problem

To all, this is what I have. I have a purchase order that is written in PHP and it creates HTML.
The purchase order can be printed out on multiple pages. Everything is good except there are no column titles being printed from the second page on. I identified from the HTML that a tbody tag needs to be moved. However when I go back and look at the PHP I do not see where the tbody tag is created. I believe I have identified all the programs that go with this process. This currently is on a test database. I will include the PHP programs and the HTML that is created by them. show_purchase.php creates the basic report where there is no tbody
tag and by the time it calls pdf3, the tbody tag seems to there. H E L P !!

Thank You

Not understanding the logic here

I have had a look at pdf3.txt which you posted but it only contains

variable not setArray
(
)

Also had a look at show_purchase.txt. This seems to be html with the following javascript at the end.

<script language="javascript">
var html2 = document.getElementsByTagName('html')[0].innerHTML;
var html = '<html>'+html2+'</html>';
var form = document.getElementsByTagName('form')[0].innerHTML;
var form2 = "<form id=\\"foo\\" name=\\"foo\\" method=\\"post\\" action=\\"pdf3.php\\" target=\\"_blank\\">"+form+"</form>";
var html3 = html.replace(form2,"");
var script = document.getElementsByTagName('script')[0].innerHTML;
var script2 = "<script language=\\"javascript\\">" + script;
var html4 = html3.replace(script2,"");
document.getElementsByTagName('textarea')[0].value = html4;
document.getElementById('invoice').value = document.location.href;
function submitForm(){
document.getElementsByTagName('form')[0].submit();
}
</script>

This seems to be capturing the html of the page and submitting it, after some manipulation, to pdf3.php. Now capturing the html does not mean capture the html that you sent rather it means capture the browser’s interpretation of that the page is. If it thinks <tbody> is a good thing it will put them in.

I will have to update the pdf3.txt file

Here is a updated version of the pdf3.txt file

Previously you wrote

I identified from the HTML that a tbody tag needs to be moved. However when I go back and look at the PHP I do not see where the tbody tag is created.

To which I offered as an explanation

This [Javascript] seems to be capturing the html of the page and submitting it, after some manipulation, to pdf3.php. Now capturing the html does not mean capture the html that you sent rather it means capture the browser’s interpretation of that the page is. If it thinks <tbody> is a good thing it will put them in.