PHP Development...LOGIN

PHP Development Enterprise Website Tutorial: Delete About Us Information

Deletion is very simple, let’s look at the code directly

<?php
    require_once('conn.php');
    $id = $_GET['id'];
    $sql="delete from about where id='$id'";
    $res = mysql_query($sql);
    if($res){
        echo "<script>alert('删除信息成功');location.href='about.php'</script>";
    }else{
        echo "<script>alert('删除信息失败');location.href='about.php'</script>";
    }
?>

Get the id passed by the deletion link and then delete it based on the id

Next Section
<?php require_once('conn.php'); $id = $_GET['id']; $sql="delete from about where id='$id'"; $res = mysql_query($sql); if($res){ echo "<script>alert('删除信息成功');location.href='about.php'</script>"; }else{ echo "<script>alert('删除信息失败');location.href='about.php'</script>"; } ?>
submitReset Code
ChapterCourseware