$pdf->cell(4.7,1,$header[0],1,0,'C',1);// Le nom dans tous les cas
for($i=0;$i<count($_POST['choix']);$i++)
{
if(isset($_POST['choix'][$i]))
$pdf->cell(4.7,1,$header[$i+1],1,0,'C',1);// les autres postes si cases cochées
}
$resultat = odbc_exec( $cnx, 'SELECT Nom'.$addInQuery.' FROM Annuaire ORDER BY Nom');
$pdf->SetFillColor(0xdd,0xdd,0xdd);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('Arial','',8);
$pdf->SetXY(1,$pdf->GetY()+1);
$fond=0;
while( $row = odbc_fetch_array( $resultat ) ) //tant que c pas la fin de la table
{
$pdf->cell(4.7,0.7,$row['Nom'],1,0,'C',$fond);
if(isset($_POST['choix'][0]))
$pdf->cell(4.7,0.7,$row['Societe'],1,0,'C',$fond);
if(isset($_POST['choix'][1]))
$pdf->cell(4.7,0.7,$row['Fixe'],1,0,'C',$fond);
if(isset($_POST['choix'][2]))
$pdf->cell(4.7,0.7,$row['Fax'],1,0,'C',$fond);
if(isset($_POST['choix'][3]))
$pdf->cell(4.7,0.7,$row['Portable'],1,0,'C',$fond);
if(isset($_POST['choix'][4]))
$pdf->cell(4.7,0.7,$row['Mail'],1,0,'C',$fond);
flopad
Messages postés528Date d'inscriptionmercredi 28 septembre 2005StatutMembreDernière intervention 6 mars 2009 15 févr. 2006 à 16:49
J'ai essayé de suivre, mais ca me donne une erreur ; mon code est :
Site N° téléphone fixe N° fax N° portable Adresse e-mail
ERREUR :Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 427Notice: Array to string conversion in D:\qualite\fpdf\fpdf.php on line 679Warning: Cannot modify header information - headers already sent by (output started at D:\qualite\fpdf\fpdf.php:427) in D:\qualite\fpdf\fpdf.php on line 1022FPDF error: Some data has already been output to browser, can't send PDF file