$sum = $item['count']*$item['price']; echo "<td>合计:".round($sum,2); echo"<td><input type=button value='删除' onclick=\"location='?action=remove&key=".$item['ID']."'\">"; } echo "<input type=hidden name=action value=modi>"; echo "<tr><td colspan=7><input type=submit />"; echo "</td></form></tr></table>"; ?> <hr> <form method="post" action="tmp.php"> ID:<input type="text" name="p[]" /> 品名:<input type="text" name="p[]" /> 单价:<input type="text" name="p[]" /> 数量:<input type="text" name="p[]" /> <input type=hidden name=action value=add> <input type="submit" /> </form> |