<?php

$cookie_name = "user_con";
	
if(!isset($_COOKIE[$cookie_name])) {
   // echo "Cookie named '" . $cookie_name . "' is not set!";
	header('Location: sign-in.php');
	exit;
} else {
    //echo "Cookie '" . $cookie_name . "' is set!<br>";
    //echo "Value is: " . $_COOKIE[$cookie_name];
}

$con_id =  $_COOKIE[$cookie_name];
$docu_id  = mysql_escape_string($_GET['docu_id']);



$con = mysql_connect('localhost', 'root', 'Boom95z') or die(mysql_error());
mysql_select_db('orion9', $con);

 

mysql_query("delete from contractor_documents where con_id = " . $con_id  . " and docu_id=" . $docu_id, $con);

echo "delete from contractor_documents where con_id = " . $con_id  . " and docu_id=" . $docu_id;
mysql_close($con);

header('Location:contractor-documents.php');


?>