我有一个用 php 制作的表格,在该表格中我显示了我的数据库中的一些内容。我在每个 td 中创建了一个简单的按钮(类似于 like),我希望它在每次点击时增加 1。这是带有按钮的行:
echo "<tr align=\"center\">
<td>$nameTemp</td>
<td>$categoryTemp</td>
<td>$textTemp</td>
<td>$likesTemp <input type= 'submit' value='like' name='likes'></td>
<td>$usernameTemp</td>
<td> <button type=\"button\" style=\"cursor:pointer\" onclick=\"openWindow('$multimediaTemp','div1')\">View me</button> </td>
</tr>
";
$likesTemp 是总喜欢 var