prepare("UPDATE projects SET showinmain = 1 WHERE pid = $prid "); $stmt->execute(array()); header('location:projects.php?okshow'); exit(); } ?> prepare("UPDATE projects SET showinmain = 0 WHERE pid = $prid "); $stmt->execute(array()); header('location:projects.php?pendshow'); exit(); } ?> prepare("UPDATE projects SET showinhead = 1 WHERE pid = $prid "); $stmt->execute(array()); header('location:projects.php?shhead'); exit(); } ?> prepare("UPDATE projects SET showinhead = 0 WHERE pid = $prid "); $stmt->execute(array()); header('location:projects.php?xshhead'); exit(); } ?> prepare("SELECT * FROM projects WHERE pid = $prid"); // execute Query $stmt2->execute(); // fetch the data $info = $stmt2->fetch(); $img1 = $info['img1']; $img2 = $info['img2']; $img3 = $info['img3']; $img4 = $info['img4']; $img5 = $info['img5']; $img6 = $info['img6']; $img7 = $info['img7']; $img8 = $info['img8']; $img9 = $info['img9']; $img10 = $info['img10']; $path1 = "images/uploads/projects/$img1"; $path2 = "images/uploads/projects/$img2"; $path3 = "images/uploads/projects/$img3"; $path4 = "images/uploads/projects/$img4"; $path5 = "images/uploads/projects/$img5"; $path6 = "images/uploads/projects/$img6"; $path7 = "images/uploads/projects/$img7"; $path8 = "images/uploads/projects/$img8"; $path9 = "images/uploads/projects/$img9"; $path10 = "images/uploads/projects/$img10"; if (file_exists($path1)) {@unlink("images/uploads/projects/$img1");} if (file_exists($path2)) {@unlink("images/uploads/projects/$img2");} if (file_exists($path3)) {@unlink("images/uploads/projects/$img3");} if (file_exists($path4)) {@unlink("images/uploads/projects/$img4");} if (file_exists($path5)) {@unlink("images/uploads/projects/$img5");} if (file_exists($path6)) {@unlink("images/uploads/projects/$img6");} if (file_exists($path7)) {@unlink("images/uploads/projects/$img7");} if (file_exists($path8)) {@unlink("images/uploads/projects/$img8");} if (file_exists($path9)) {@unlink("images/uploads/projects/$img9");} if (file_exists($path10)) {@unlink("images/uploads/projects/$img10");} $stmt = $conn->prepare("DELETE FROM projects WHERE pid = :zid"); $stmt->bindparam(":zid", $prid); $stmt->execute(); header('location:projects.php?delpr'); exit(); } ?>