renzomassaro Posted July 11, 2007 Share Posted July 11, 2007 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(; $pdf->SetFont('Arial', '', 10); $valX = $pdf->GetX(); $valY = $pdf->GetY(); $pdf->Cell(15, 5, $data['documentatie'], 1, 0, 'R'); $pdf->Ln(); $pdf->Ln(; $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); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.