网页中有两个下拉菜单,从菜单中分别选择选项,按提交按钮,就会产生一个PDF 文档,文档里就是所query得到的数据, 请问这个怎么现实啊?
Form.php   <form action=" " method="get" name="form2"  > 
           <input name="township" type="text" class="textbox" size="8">
           <input name="rng" type="text" class="textbox" size="8">
           <input name="dir" type="text" class="textbox" size="8">
           <input name="section" type="text" class="textbox" size="8">
             <input type="submit" name="submit"    value="Submit">
</form>Query 语句:
Query.php<?php
$map = array ('Township' => 'township', 'Rng1' => 'rng', 'Direction' => 'dir', 'Section' => 'section' );
$where = '';
$and = '';
foreach ( $map as $k =>$v ) { if(!empty($_GET[$v])) { $where .= $and . $k ."= '".$_GET [$v]."'";$and = ' and ';}}
$query =" SELECT Business_Owner,On_Site_Manager,On_Site_Phone,Business_Name,Mailing_Address,Phone_Number,Crop_Type,Crop_Location,Section,Township,Rng1,Direction,Quarter,Acreage,County,Date_Of_Entry,Contact FROM data_query ";
if (!empty($where )) {$query .= ' WHERE ' . $where . ' ORDER BY County, Township, Rng1';}
?>
怎么生成PDF file 呢?完全没有头绪!! 大家帮帮忙吧,先谢了。