<?php
/*
********************************************************************************

    filename:     burndeleteprocess.php
    description:  delete selected burn in burns table, statuses table
    inputs:       burnId
    outputs:      none
    actions:      none
    redirections: burnlist.php

********************************************************************************
*/
/*
    ... connect to database
*/
    include 'functions.php';
//    $conn = connectToDB();
/*
    ... get burn id
*/
    $burnId = $_GET["burnId"];
/*
    ... delete burn
*/
    deleteBurn($burnId);
//    if ($burnId != "") {
//        $sql= "DELETE FROM burns WHERE burnId = $burnId";
//        if (!mysqli_query($conn, $sql)) {
//            error_log("Error: " . $sql . " " . mysqli_error($conn));
//        }
//        $sql= "DELETE FROM statuses WHERE burnId = $burnId";
//        if (!mysqli_query($conn, $sql)) {
//            error_log("Error: " . $sql . " " . mysqli_error($conn));
//        }
//    }
/*
    .... redirect to burn list
*/
    header('Location: burnlist.php');
/*
    ... close database connection
*/
//    mysqli_close($conn);
?>