猫叔,我这个按钮为什么获取不到,不起作用
<div class="col text-center">
<input type="submit" name="button" id="button" value="修改" class="btn btn-outline-
secondary"> <input type="reset" class="btn btn-outline-danger">
</div>
<?php
if(isset($_POST['button']))
{
$username = $_POST['username'];
$password = $_POST['password'];
$phone = $_POST['phone'];
$sql = "update user set username='$username',password='$password',phone='$phone' where id='$id'";
$result=mysqli_query($link,$sql);
if ($result)
{
echo "<script>alert('修改成功!');location.href='user_management.php';</script>";
}
else
{
echo "<script>alert('修改失败!');location.href='user_management.php';</script>";
}
}
?>
请登录后查看评论内容