我正在尝试更新属性的值
$lid = $_GET["id"];
$check_user = mysql_query("select employee.Emp_Name, leave.Leave_Type from `leave`, employee where leave.Leave_ID = $lid AND leave.Emp_ID = employee.Emp_ID ");
while($rows = mysql_fetch_assoc($check_user))
{
echo "<td>: </td>";
echo "<td>". $rows['Leave_Type']."</td>";
echo "</tr>";
echo "<td>: </td>";
echo "<td>". $rows['Emp_Name']."</td>";
echo "</tr>";
}
if (isset($_POST["submitbtn"]))
{
if($rows['Leave_Type'] == 'Annual')
{
mysql_query("update `leave` set Status = 'Approved' where Leave_ID = $lid");
}
}
当我运行它时没有错误,但我的数据库中的属性值没有更新