Jump to content

FPDF


renzomassaro

Recommended Posts

Hello,

 

Somebody expreience with FPDF? And diagrams in it?

 

I have this script but can't figure out how to show data from my database in it...

 

<?

$result = mysql_query("SELECT * FROM enquete WHERE Park LIKE '%".$_POST['parkres']."%' AND Aankomst BETWEEN '".$_POST['datebox']."' AND '".$_POST['datebox2']."'");

 

 

while ($row = mysql_fetch_assoc($result)) {

$data = array($row['documentatie']);

 

//Pie chart

$pdf->SetFont('Arial', 'BIU', 12);

$pdf->Cell(0, 5, '1 - Pie chart', 0, 1);

$pdf->Ln(8);

 

$pdf->SetFont('Arial', '', 10);

$valX = $pdf->GetX();

$valY = $pdf->GetY();

 

$pdf->Cell(15, 5, $data['documentatie'], 1, 0, 'R');

$pdf->Ln();

 

 

$pdf->Ln(8);

 

$pdf->SetXY(90, $valY);

$col1=array(100,100,255);

$col2=array(255,100,100);

$col3=array(255,255,100);

$col4=array(100,100,255);

$col5=array(255,100,100);

$col6=array(255,255,100);

 

 

$pdf->PieChart(100, 35, $data['documentatie'], '%l (%p)', array($col1,$col2,$col3,$col4,$col5,$col6));

 

$pdf->SetXY($valX, $valY + 40);

?>

Link to comment
https://forums.phpfreaks.com/topic/59428-fpdf/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.