<html>
<head>
<title>Repeating Table Headers on Each Page</title>
<style type="text/css">
    table {font-family: Helvetica, Arial, Verdana; font-size: 24pt
    }
    @media print {
        thead {display: table-header-group;}
		
	@page { @top-right { content: "Page " counter(page) " of " counter(pages); } }
	
    }
	

</style>
</head>
<table>
<thead>
<?php
session_start();
include("config.inc.php");
include 'function.inc.php';

//Set Time Execution For the Report
ini_set('max_execution_time', $config['ReportTimeExecution']);

$connection = mysql_connect($config['dbServer'],$config['dbUser'],$config['dbPass']) or die("Could not connect to DB");
mysql_select_db($HTTP_SESSION_VARS['dbName'],$connection) or die("Could not find DB");

echo"<tr><td align='left'>";
	
	ShowReportHeader('Client Sales Report', $connection);
	
echo"</td></tr>";

echo'<div class="question-list-footer">
    <div class="question-list-footer-center">
        <span>Page Number: <span id="pageNumber"></span></span><br/>
        
    </div>
</div>';



?>
    <tr>
        <th>Column 1</th>
        <th>Column 2</th>
        <th>Column 3</th>
    </tr>
</thead>
<tbody>
    <tr>
        <td>1-1</td>
        <td>2-1</td>
        <td>3-1</td>
    </tr>
    <tr>
        <td>1-2</td>
        <td>2-2</td>
        <td>3-2</td>
    </tr>
    <tr>
        <td>1-3</td>
        <td>2-3</td>
        <td>3-3</td>
    </tr>
    <tr>
        <td>1-4</td>
        <td>2-4</td>
        <td>3-4</td>
    </tr>
    <tr>
        <td>1-5</td>
        <td>2-5</td>
        <td>3-5</td>
    </tr>
    <tr>
        <td>1-6</td>
        <td>2-6</td>
        <td>3-6</td>
    </tr>
    <tr>
        <td>1-7</td>
        <td>2-7</td>
        <td>3-7</td>
    </tr>
    <tr>
        <td>1-8</td>
        <td>2-8</td>
        <td>3-8</td>
    </tr>
    <tr>
        <td>1-9</td>
        <td>2-9</td>
        <td>3-9</td>
    </tr>
    <tr>
        <td>1-10</td>
        <td>2-10</td>
        <td>3-10</td>
    </tr>
    <tr>
        <td>1-11</td>
        <td>2-11</td>
        <td>3-11</td>
    </tr>
    <tr>
        <td>1-12</td>
        <td>2-12</td>
        <td>3-12</td>
    </tr>
    <tr>
        <td>1-13</td>
        <td>2-13</td>
        <td>3-13</td>
    </tr>
    <tr>
        <td>1-14</td>
        <td>2-14</td>
        <td>3-14</td>
    </tr>
    <tr>
        <td>1-15</td>
        <td>2-15</td>
        <td>3-15</td>
    </tr>
    <tr>
        <td>1-16</td>
        <td>2-16</td>
        <td>3-16</td>
    </tr>
    <tr>
        <td>1-17</td>
        <td>2-17</td>
        <td>3-17</td>
    </tr>
    <tr>
        <td>1-18</td>
        <td>2-18</td>
        <td>3-18</td>
    </tr>
    <tr>
        <td>1-19</td>
        <td>2-19</td>
        <td>3-19</td>
    </tr>
    <tr>
        <td>1-20</td>
        <td>2-20</td>
        <td>3-20</td>
    </tr>
    <tr>
        <td>1-21</td>
        <td>2-21</td>
        <td>3-21</td>
    </tr>
    <tr>
        <td>1-22</td>
        <td>2-22</td>
        <td>3-22</td>
    </tr>
    <tr>
        <td>1-23</td>
        <td>2-23</td>
        <td>3-23</td>
    </tr>
    <tr>
        <td>1-24</td>
        <td>2-24</td>
        <td>3-24</td>
    </tr>
    <tr>
        <td>1-25</td>
        <td>2-25</td>
        <td>3-25</td>
    </tr>
    <tr>
        <td>1-26</td>
        <td>2-26</td>
        <td>3-26</td>
    </tr>
    <tr>
        <td>1-27</td>
        <td>2-27</td>
        <td>3-27</td>
    </tr>
    <tr>
        <td>1-28</td>
        <td>2-28</td>
        <td>3-28</td>
    </tr>
    <tr>
        <td>1-29</td>
        <td>2-29</td>
        <td>3-29</td>
    </tr>
    <tr>
        <td>1-30</td>
        <td>2-30</td>
        <td>3-30</td>
    </tr>
    <tr>
        <td>1-31</td>
        <td>2-31</td>
        <td>3-31</td>
    </tr>
    <tr>
        <td>1-32</td>
        <td>2-32</td>
        <td>3-32</td>
    </tr>
    <tr>
        <td>1-33</td>
        <td>2-33</td>
        <td>3-33</td>
    </tr>
    <tr>
        <td>1-34</td>
        <td>2-34</td>
        <td>3-34</td>
    </tr>
    <tr>
        <td>1-35</td>
        <td>2-35</td>
        <td>3-35</td>
    </tr>

</tbody>

<?php
print <<< HERE

<script language=javascript>
if (typeof(window.print) != 'undefined')
{
    window.print();
}
</script>
HERE;

function current_server_time($connection){

  $string="Select date_format(NOW(),'%Y-%m-%d %h:%i %p'),dayname(now()) ";
  $result=mysql_query($string,$connection) or die(mysql_error());
  $now=mysql_fetch_row($result);

  return $now;
}
?>
</html>