saluti e buon 150mo compleanno a tutti:
sto cercando di stampare un report con tcpdf, ma in output mi genera 3 righe di errore per ogni riga dalla tabella...
tutto ciò mi è ignoto, potreste aiutarmi:
qui ci sono gli errori e poi il codice che li genera...
Notice: Undefined index: thead in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\tcpdf\tcpdf.php on line 18468
Notice: Undefined index: rows in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\tcpdf\tcpdf.php on line 18910
Warning: array_push() expects parameter 1 to be array, null given in C:\Programmi\Apache Software Foundation\Apache2.2\htdocs\tcpdf\tcpdf.php on line 18912
TCPDF ERROR: Some data has already been output, can't send PDF file
Codice PHP:
$tbl = <<<EOT
<table border=1>
<thead><tr>
<th>Grado</th><th>Cognome</th><th>Nome</th><th>Utenza Tim Duo</th>
<th>Abitazione</th><th>Cell. Priv.</th><th>Cell. Serv.</th>
<th>Ufficio</th><th>Interno</th><th>Note</th><th>Usa Tim Duo</th>
</tr></thead>
EOT;
while ($riga = mysql_fetch_array($result)){
$gr=$riga['grado'];
$co=$riga['cognome'];
$no=$riga['nome'];
$ut=$riga['utenza'];
$ca=$riga['casa'];
$pri=$riga['privato'];
$ser=$riga['servizio'];
$uff=$riga['ufficio'];
$int=$riga['interno'];
$note=$riga['note'];
$sim=$riga['usa_tim'];
$tbl .= <<<EOD
<tr><td>$gr</td><td>$co</td>
<td>$no</td><td>$ut</td>
<td>$ca</td><td>$pri</td>
<td>$ser</td><td>$uff</td>
<td>$int</td><td>$note</td>
<td>$sim</tr>
EOD;
}
$tbl.= "</table>";
$pdf->writeHTML($tbl, true, false, false, false, '');
//Close and output PDF document
$pdf->Output('recapiti_telefonici.pdf', 'I');