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.
 
 
 

34 lines
573 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");
}
}
//načtení odeslaných dat
$id = $_POST["id"];
$id_nk_users = $_POST["id_nk_users"];
$title = $_POST["title"];
$msg = $_POST["msg"];
$sql = "UPDATE nk_prispevky SET
id_nk_users='$id_nk_users',
title='$title',
msg='$msg'
WHERE id=$id";
if(mysqli_query($conn,$sql)) {
header("Location: /?update=1");
} else {
header("Location: /error=4");
}
?>