<?php
  $id = $_GET["id"];
  require "UserAdmin/super_secret_stuff.php";
  $con = mysqli_connect($website,$mysqli_username,$pw,$dbase);
  $res = mysqli_query($con,"SELECT  meas_perf FROM Calibro_projects WHERE calproj_id = {$id}");
  while($row = mysqli_fetch_array($res))$meas_perf = $row[0];
  unlink($proj_file_path_deep . $meas_perf);
  mysqli_query($con,"DELETE FROM Calibro_results WHERE calproj_id = {$id}");
  mysqli_query($con,"DELETE FROM Calibro_projects WHERE calproj_id = {$id}");
  mysqli_close($con);
  header("location: projects.php");
?>
