Your IP : 18.218.113.78


Current Path : /data/web/virtuals/51568/virtual/www/plan/
Upload File :
Current File : /data/web/virtuals/51568/virtual/www/plan/textyUNUloz.php

 <?php

  require_once('DbConnect.php');
  if (IsSet($_POST["id"])){$id = trim($_POST["id"]);}  
  if (IsSet($_POST["idTyden"])){$idTyden = $_POST["idTyden"];}
  if (IsSet($_POST["cislo"])){$cislo = trim($_POST["cislo"]);}
  if (IsSet($_POST["strana"])){$strana = $_POST["strana"];} 
  if (IsSet($_POST["clanek"])){$clanek = $_POST["clanek"];} 
  if (IsSet($_POST["operace"])){$operace = trim($_POST["operace"]);}  
   if ($operace == 'e') {  
    $stmt = "UPDATE `pl_un` SET `cislo`= '$cislo',`strana`= '$strana', `clanek`= '$clanek' WHERE id = $id";
    $result = mysqli_query($conn, $stmt);
  } else {
    $stmt = "INSERT INTO `pl_un`(`idtyden`, `cislo`, `strana`, `clanek`) VALUES (?, ?, ?, ?)";
    $call = mysqli_prepare($conn,  $stmt);
    mysqli_stmt_bind_param($call, 'isss', $idTyden, $cislo, $strana, $clanek); 
    mysqli_stmt_execute($call);
  }
?>