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 27 28 29 30 31 32 33
| <?php
include("variables.inc.php");
// connection à la base
$liendb = mysql_connect($bddserver, $bddlogin, $bddpassword);
mysql_select_db ($bdd);
$query="select * from retenues where Quand1='".$_REQUEST['id']."'";
$resultat=mysql_query($query);
// fin de connection à la base
require('fpdf.php');
$pdf=new FPDF('P','cm','A4');
ob_start();
$pdf->SetFont('arial','B',8);
$pdf->AddPage();
$pdf->SetFillColor(255,255,255);
$pdf->SetTextColor(0,0,0);
header ('Content-type: text/html; charset=utf-8');
$fond=0;
// affichage de la sanction
while($row=mysql_fetch_row($resultat))
{
$pdf->SetFont('arial','B',16);
$pdf->SetXY(2,4);
$pdf->Cell(0,6,$row['elenom'],0,1,'C');
$pdf->SetFont('arial','B',8);
}
// fin affichage de la sanction
$pdf->output();
?> |
Partager