<?php
include 'database.php';

if(isset($_GET['record_childtest'])){
	$update_id = $_GET['record_childtest'];
	$sql = "DELETE FROM child_technology_test WHERE test_id='$update_id'";
	$result = mysqli_query($conn,$sql);	
	header('location:'.$_SERVER['HTTP_REFERER']); 
}
elseif(isset($_GET['record_selftest'])){
	$update_id = $_GET['record_selftest'];
	$sql = "DELETE FROM self_e_addiction WHERE test_id='$update_id'";
	$result = mysqli_query($conn,$sql);	
	header('location:'.$_SERVER['HTTP_REFERER']); 
}
elseif(isset($_GET['record_partnertest'])){
	$update_id = $_GET['record_partnertest'];
	$sql = "DELETE FROM partner_e_addiction WHERE test_id='$update_id'";
	$result = mysqli_query($conn,$sql);	
	header('location:'.$_SERVER['HTTP_REFERER']); 
}


?>