2
<?php
require('mysql_report.php');
$checkbox = $_GET['checkbox'];
//geting Array of values from GET methode
foreach ($checkbox as $value)
{
$sql="SELECT name,address,email,problem,reply_query FROM query where id = $value ";
$result = mysql_query($sql);
while($row = mysql_fetch_array($result)){
}
$pdf = new PDF('L','pt','A4');
$pdf->SetFont('Arial','',12);
$pdf->connect('localhost','uname','pwd','mydb');
$attr = array('titleFontSize'=>18, 'titleText'=>'Report');
$qry=$pdf->mysql_report($sql,false,$attr);
}
$pdf->Output();
?>
這裏是代碼我從$ _GET ['checkbox'];當選中的複選框時,我如何得到pdf如何在通過GET或POST方法獲取數組值的同時使用Mysql在PHP中生成PDF?
謝謝你,這是對我來說非常有用 – Naveenbos