我从 MYSQL 数据库中提取了数百个数据,然后将它们填充到一个表中。每个表都有一个列名“预览”,它将生成预览按钮。当我们单击该预览按钮时,它必须将该行的应用程序 ID 传递给 genpdf.php,但我可以传递该特定行的应用程序 ID。
<form id="genpdf" action="genpdf.php" method="POST">
<h3 style="padding:10px;">List of Application Submitted</h3>
<table width="100%" style="padding: 10px;">
<tr>
<td><strong>S. No.</strong></td>
<td><strong>Application ID</strong></td>
<td><strong>Name</strong></td>
<td><strong>Date of Birth</strong></td>
<td><strong>Telephone</strong></td>
<td><strong>Email</strong></td>
<td><strong>Preview</strong></td>
</tr>
<?php
$i = 1;
while($row = mysql_fetch_array($record))
{
echo '<tr><td>' . $i . '</td>';
echo '<td>' . $row['applicationid'] . '</td>';
echo '<td>' . $row['title'] . ' ' . $row['firstname'] . ' ' . $row['middlename'] . ' ' . $row['familyname'] . '</td>';
echo '<td>' . $row['dobmonth'] . '/' . $row['dobday'] . '/' . $row['dobyear'] . '</td>';
echo '<td>' . $row['telephonet4'] . '</td>';
echo '<td>' . $row['emailt4'] . '</td>';
echo '<td><input type="submit" value "Preview" /></td>';
$i += 1;
}
?>
</table>
</form>