我想要的很简单,我有一个按钮提交一个值到我的数据库一旦点击,我需要的是价值已经submited后,和我所看到的代码都在页面刷新时启用按钮..请有人可以帮我吗?提交和页面刷新后禁用提交按钮
我的形式和按钮的代码如下:
的一切,如果你提交<form action="<?php echo $editFormAction; ?>" method="POST" name="Status2" id="Status2" onSubmit="return confirm('Are you sure you want to submit?');">
<input name="Confirm2" type="checkbox" id="Confirm2" value="Confirmed" checked="CHECKED" style="display:none;">
<label for="Confirm2"></label>
<input name="UpdateButton3" type="submit" class="art-button" id="UpdateButton3" value="Confirm"/>
<input name="UserIDHiddenField4" type="hidden" id="UserIDHiddenField4" value="<?php echo $row_User['UserID']; ?>">
<input name="Purge2" type="checkbox" id="Purge2" value="You Will Be Rematched Soon!" checked="CHECKED" style="display:none;">
<label for="Purge2"></label>
<input type="hidden" name="MM_update" value="Status2">
</form>
如果该值存在,则可以设置会话值(php)或本地存储值(javascript)禁用按钮。 – thekodester
检查数据库中的值..如果设置为禁用按钮添加属性 – georoot
要将值从1页转移到另一页,请使用会话。您也可以将值存储在特定用户的数据库中,该值将声明该提交按钮是否被禁用。 – Xorifelse