我擁有適用於我們軟件工程的管理信息系統。這是我想要發生的事情。輸入客戶的基本信息後,他/她的記錄(帶ID)將顯示在客戶列表中。旁邊是2個按鈕,第一個按鈕是'Contract 1',第二個是'Contract 2'。在填寫其中一份合同後,我希望按鈕不可點擊。防止用戶在某些表格填滿後重新打開(單擊)按鈕
(另一種解釋) 如果合同是空的,使'按鈕'可點擊以便用戶可以添加。但是填充後,該按鈕將無法再使用。
我想你可能需要此代碼
<?php
include 'connect-db.php';
?>
<table class="myTable" width="80%">
<th width="5%">Customer<br>Number</th>
<th>CRC</th>
<th>Name</th>
<th>Service<br>Contract</th>
<th>Chapel<br>Contract</th>
</tr>
<?php
$sql = "SELECT * FROM records ORDER BY CustomerNumber DESC LIMIT 5";
$result = mysql_query($sql);
if(mysql_num_rows($result) > 0){
while($row = mysql_fetch_assoc($result)){
?>
<tr>
<td><?=$row['CustomerNumber']?></td>
<td><?=$row['CRC']?></td>
<td><?=$row['Name']?></td>
<td>
**<a href="editprocess-service.php?CustomerNumber=<?=$row['CustomerNumber']?>">Add</a>
</td>
<td>
<a href="editprocess-chapel.php?CustomerNumber=<?=$row['CustomerNumber']?>">Add</a>
</td>**
</tr>
<?php
}
}
?>
</table>
<br>
<a href="masterlist.php"><input type="button" value="New Record" style="margin-left: 785px;"></a>
以粗體顯示的代碼就是我想要的神奇的事情發生。先謝謝你!