我想在单击按钮时包含一个功能。该代码基本上从数据库中检索数据行,每行都有一个 X 按钮。我希望我的解释清楚!
( "</td><td><a href ='delete.php?id=".
$row['trade_id']."'>X</a>
</td></tr>"; )
. 单击 ahref X 后如何执行操作(包括功能)?我该怎么做呢?例子:
if (buttonclicked)
{
require 'function.php';
}
php
while($row = mysql_fetch_assoc($result)){
echo "<tr><td>" . $row['trade_id'] .
"</td><td>" . $row['selection'] .
"</td><td>" . $row['date'] .
"</td><td>" . $row['type'] .
"</td><td>" . $row['size'] .
"</td><td>" . $row['bidprice'] .
"</td><td>" . $row['offerprice'] .
"</td><td>" . $row['stoploss'] .
"</td><td>" . $row['takeprofit'] .
"</td><td>" . $closedb .
"</td><td>" . $profit .
"</td><td><a href ='delete.php?id=".
$row['trade_id']."'>X</a>
</td></tr>";
echo "</table><br>";