Php MySQL表,点击记录选择

Php MySQL表,点击记录选择,php,forms,Php,Forms,我有一个PHP脚本,它创建了一个包含name、sales和cert列的表。 我有一个if语句,它只在证书列中针对登录用户的记录显示一个图标。所有这些都可以 现在我想设置它,这样当用户单击显示的证书图标时,它将$\u POST[year]和$\u POST[sales]传递给test.php脚本。我正试图使用以下代码段来执行此操作,但遇到了问题: $form_start="<form name='test' method='post' action='test.php'>";

我有一个PHP脚本,它创建了一个包含name、sales和cert列的表。 我有一个if语句,它只在证书列中针对登录用户的记录显示一个图标。所有这些都可以

现在我想设置它,这样当用户单击显示的证书图标时,它将$\u POST[year]和$\u POST[sales]传递给test.php脚本。我正试图使用以下代码段来执行此操作,但遇到了问题:

$form_start="<form name='test' method='post' action='test.php'>";            
$form_end="</form>";
echo "<td>".$row['year']."&nbsp;</td><td><b>".$row['name']."</b></td><td>".$row['sales']."</td><td>". '<input type="submit"; value='.$row['sales'].'; style="background:url('.$cert_image.'); width: 24px; height: 17px; border: none; no-repeat; />'."</td></tr>";
谁能给我指一下正确的方向吗

好的,我现在有以下代码:

$form_start="<form name='test' method='post' action='test.php'>";            
$form_end="</form>";
echo "<td>".$row['year']."</td><td><b>".$row['name']."</b><input type='hidden'; name='cYear'; value=".$row['year']."/></td><td>".$row['sales']."<input type='hidden'; name='cSales'; value=".$row['sales']." /></td><td><input type='image'; src=$cert_image width: 24px; height: 17px; border: none; no-repeat; alt='Click to revive your Annual Table Certificate'; /></td></tr>";
至少在我看来,这是正确的,但当我单击所需表行中的图像文件时,什么也没有发生,即test.php文件不是由以下人员调用的: $form_start=

有人知道我做错了什么吗?

别忘了method=post in:


为什么每个标记中都有分号?在形式上,在测试和行动之间开始?这是我的错,我想一定有。除去它们并没有什么不同。我现在可以调用test.pgp,但我发布的值为空。这可以合并为一个语句。谢谢。我现在添加了调用test.php脚本的method='post',但是test.php中的$\u post['year']和$\u post['sales']是空的?但是你的呢?啊,刚刚发现了我的错误。现在开始工作了。感谢艾尔的帮助。
<form name='test' method="post" action='test.php'>