1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| <?php
//$Input1=$_POST['Input1'];
$Input1="oui";
require('fpdf.php');
function Test($Input1){
//Test sur la variable
if ($Input1== "oui"){
$pdf = new FPDF();
$pdf->SetFont('Arial','B',16);
$pdf->AddPage();
$pdf->Cell(110);
$pdf->Cell(48,90,'texte N°1');
$pdf->AddPage();
$pdf->Cell(110);
$pdf->Cell(48,90,'texte N°2');
}
else{
$pdf = new FPDF();
$pdf->SetFont('Arial','B',16);
$pdf->AddPage();
$pdf->Cell(110);
$pdf->Cell(48,90,utf8_decode('texte N°3'));
}
$pdf->Output();
}
?> |
Partager