php repozitar
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

24 lines
451 B

<?php
session_start();
require("init.php");
// kontrola jestli to otevira clověk s dostatenym právem
if(isset($_SESSION["role"])){
if($_SESSION["role"] < 5){
header("Location: /?error=2");
}
}
$id = $_GET["id"];
$sql = "DELETE FROM nk_prispevky WHERE id=$id";
if (mysqli_query($conn,$sql)) {
echo "příkaz byl vykonán";
header("Location: /?del=$id");
} else {
echo "Error:" .$sql."<br>". mysqli_errno($conn);
}
?>