$_POST
нет ключа day
. PHP такого рода ситуации выводит как варнинг, и продолжает выполнение скрипта. $_SESSION['day'] = isset($_POST['day']) ? $_POST['day'] : null;
И поставь php-валидатор в свою IDE.
<?php
if(isset($_POST['sett']))
{
$in_sup=$_POST['sup'];
$cd=$_POST['day'];
$in_second=$_POST['garnir'];
$in_second_plus=$_POST['garnir2'];
$in_salad=$_POST['salat'];
$in_drink=$_POST['drink'];
$in_drink2=$_POST['drink2'];
$in_bread=$_POST['bread'];
$in_dessert=$_POST['dessert'];
$in_dessert2=$_POST['dessert2'];
$cn=$_POST['daycode'];
$check_usr="SELECT * FROM planning WHERE worker='$usercode' and datte='$cn'";
$result=mysqli_query($con,$check_usr) or die(mysqli_error($con));
$count=mysqli_num_rows($result);
if($count>=1){
$up_query="UPDATE planning SET worker='".$usercode."', datte='".$cn."', first='".$in_sup."', second='".$in_second."', second_plus='".$in_second_plus."', salad='".$in_salad."', drink='".$in_drink."', dessert='".$in_dessert."', bread='".$in_bread."' WHERE worker='".$usercode."' AND datte='".$cn."'";
$up=mysqli_query($con,$up_query) or die(mysqli_error($con));
echo '<script type="text/javascript">
window.open("https://localhost/kitchen/login1.php","_self");
</script>';
}else{
$add_query="INSERT INTO planning (worker, datte, first,second, second_plus,salad,drink,drink2,dessert,dessert2,bread) VALUES ('$usercode','$cn','$in_sup','$in_second','$in_second_plus','$in_salad','$in_drink','$in_drink2','$in_dessert','$in_dessert2','$in_bread')";
$sa=mysqli_query($con,$add_query) or die(mysqli_error($con));
echo '<script type="text/javascript">
window.open("https://localhost/kitchen/login1.php","_self");
</script>';
}
}
}
else{
echo '<script>alert("Невірна дата")
window.location.href="login1.php";
</script>';
}
?>
if($count>=1){
$up_query="UPDATE planning SET worker='".$usercode."', datte='".$cn."', first='".$in_sup."', second='".$in_second."', second_plus='".$in_second_plus."', salad='".$in_salad."', drink='".$in_drink."', dessert='".$in_dessert."', bread='".$in_bread."' WHERE worker='".$usercode."' AND datte='".$cn."'";
$up=mysqli_query($con,$up_query) or die(mysqli_error($con));
echo '<script type="text/javascript">
window.open("https://localhost/kitchen/login1.php","_self");
</script>';
}else{
$add_query="INSERT INTO planning (worker, datte, first,second, second_plus,salad,drink,drink2,dessert,dessert2,bread) VALUES ('$usercode','$cn','$in_sup','$in_second','$in_second_plus','$in_salad','$in_drink','$in_drink2','$in_dessert','$in_dessert2','$in_bread')";
$sa=mysqli_query($con,$add_query) or die(mysqli_error($con));
echo '<script type="text/javascript">
window.open("https://localhost/kitchen/login1.php","_self");
</script>';
}
}
}
else{
echo '<script>alert("Невірна дата")
window.location.href="login1.php";
</script>';
}
$sel_day="SELECT * FROM menu WHERE dayname='".$cc."'";
$get_day=mysqli_query($con,$sel_day) or die(mysqli_error($con));
while($row_d = mysqli_fetch_array($get_day)){
echo "<input type='hidden' name='daycode' value='".$row_d['cod']."'>";
$cd=$row_d['cod'];}
if(isset($cd)==True){
#get(day) відкривається
$newDate = date("d-m-Y", strtotime($cc));
echo "<h2><label>".$newDate ."</label></h2>";
?>