<?Php
require('fpdf/fpdf.php');
$host = "localhost";
$username = "root";
$password = "";
$db_name = "Students";
$con = new mysqli($host, $username, $password, $db_name);
$count = "SELECT * FROM class";
$pdf = new FPDF();
$pdf->AddPage();
$width_cell=array(70,40,30,30,20);
$pdf->SetFont('Arial','B',12);
$pdf->SetFillColor(193,229,252);
$pdf->Cell($width_cell[0],10,'ID No',1,0,'C',true);
$pdf->Cell($width_cell[1],10,'Name',1,0,'C',true);
$pdf->Cell($width_cell[2],10,'Surname',1,0,'C',true);
$pdf->Cell($width_cell[3],10,'Cell No',1,0,'C',true);
$pdf->Cell($width_cell[4],10,'Teacher',1,1,'C',true);
$pdf->SetFont('Arial','',11);
$pdf->SetFillColor(235,236,236);
$fill=false;
foreach ($con->query($count) as $row) {
$pdf->Cell($width_cell[0],10,$row['Id_no'],1,0,'C',$fill);
$pdf->Cell($width_cell[1],10,$row['Name'],1,0,'C',$fill);
$pdf->Cell($width_cell[2],10,$row['Surname'],1,0,'C',$fill);
$pdf->Cell($width_cell[3],10,$row['CellNO'],1,0,'C',$fill);
$pdf->Cell($width_cell[4],10,$row['Teacher'],1,1,'C',$fill);
$fill = !$fill;
}
$pdf->Output();
?>
Вопрос : Как добавить заголовок вверху моей страницы для каждой страницы. и заголовок таблицы на каждой странице. Я боролся, и я попробовал учебную страницу fpdf
на сайте. Но я все еще не могу заставить его работать