【发布时间】:2014-02-13 13:31:48
【问题描述】:
我有一个名为 material 的数据库表 材料:
mat_id mat_name status
1 bolts
2 steel approved
当 status = 'approved' 时,如何使我的按钮或 href 链接禁用 在我的 html 表上?
喜欢:
option mat_id material name
show button 1 bolts
no button 2 steel
我的 html/php 代码:
<?php
$resource=mysql_query("Select * from material",$con);
while($result2=mysql_fetch_array($resource))
{
?>
<tr>
<th>option</th>
<th>mat_id</th>
<th>material name</th>
</tr>
<tr>
<td align="center">
<?php
$id = $rows['reqraw_id'];
if($rows['status']=="")
{
echo '<a href="addstockout.php?id=$id" > Update </a>';
} ?>
</td>
<td><?php echo $result2['mat_id']; ?></td>
<td><?php echo $result2['mat_name']; ?></td>
</tr>
<?php };?>
这一行有问题
echo '<a href="addstockout.php?id=$id" > Update </a>';
它没有从 db 中获取 id 数组。
【问题讨论】:
标签: javascript php html mysql select