我在表单中输入了一个输入文本,当我点击打印时,它应该在pdf中打印我在表格格式后面的文本字段中输入的文本。我有一个如何从php文件中捕获数据的问题。 PFDF这是我的代码:
<?php
$html = <<<MYTABLE
<table border="1" style="width:90%" title="Leave" cellpadding="5px" align="center">
<tr>
<td rowspan=1 width="70" align:"top-left"><center><b>1. Office/Agency</b> </center><br><select name="office_agency"></td>
<td rowspan=1 width="100" colspan="2" align:"top-left"><b>2. ID / Name</b><br> </td>
</tr>
<tr>
<td rowspan=1 align:"top-left"><b>3. Date of Filing:</b><br></td>
<td rowspan=1 align:"top-left"><b>4. Position</b><br></td>
<td rowspan=1 align:"top-left"><b>4. Salary</b><br></td>
..........
MYTABLE;
require('pdftable.inc.php');
mysql_connect('localhost','root','');
mysql_select_db('auth');
$p = new PDFTable();
$p->AddPage();
$p->setfont('times','',10);
$p->Cell(5,-5,' APPLICATION FOR LEAVE');
$p->Ln(3);
$p->htmltable($html);
$p->output();
?>