Hello

delete record not working

if(isset($_POST['delete'])) {
        $ida    = $_GET['delete']; 
        $coupen = $_GET["code"];

        $update_query = "delete from shortenedurls where id=".$ida;
        $query        = mysqli_query($connection, $update_query);

        if($query) {
            header('Location: ../coupon.php?id='.$id.'&code='.$coupen);
            exit();
        } else {
            header('Location: ../update_link.php?id='.$id.'&code='.$coupen);
            exit();
        }
    }

delete record not working

What is not working exactly?

Try this

$update_query = "delete from shortenedurls where id='$ida'";

done working now thank you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.