亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

PHP development corporate website tutorial - deleting products

Click delete and jump to the delproduct.php page

Let’s take a look at the code of the delproduct.php page:

<?php
    require_once('conn.php');
    $id = $_GET['id'];
    $sql = "DELECT from product where id='$id'";
    $res = mysql_query($sql);
    if($res){
        echo "<script>alert('刪除產(chǎn)品成功');location.href='product.php'</script>";
    }else{
        echo "<script>alert('刪除產(chǎn)品失敗');location.href='product.php'</script>";
    }
?>

Get the parameter id passed by the form and then delete it based on the id

Continuing Learning
||
<?php require_once('conn.php'); $id = $_GET['id']; $sql = "DELECT from product where id='$id'"; $res = mysql_query($sql); if($res){ echo "<script>alert('刪除產(chǎn)品成功');location.href='product.php'</script>"; }else{ echo "<script>alert('刪除產(chǎn)品失敗');location.href='product.php'</script>"; } ?>
submitReset Code