<?php
include("include.php");
if ($_POST['action'] == 'correct'){
$q = mysqli_query($conn, "SELECT * FROM `notes` WHERE id_note = '{$_POST['selection']}'");
$qq = mysqli_fetch_assoc($q);
echo '
<html>
<head>
<meta charset="utf-8">
<title>Редактирование задачи</title>
<link rel="stylesheet" href="objects.css" />
</head>
<body>
<form action="ae.php" method="POST">
Измените задачу:<br>
<textarea id="text_field" name="text" rows="1" cols=""30>' . $qq['note'] . '</textarea>
<button type="submit" value="' . $qq['id_note'] . '" id="edit" name="id">Исправить</button>
</form>
</body>
</html>
';
}
if ($_POST['action'] == 'delete'){
$sql = mysqli_query($conn, "DELETE FROM `notes` WHERE id_note = '{$_POST['selection']}'");
header('Location: index.php');
}
if (isset($_POST["id"])){
$sql = mysqli_query($conn, "UPDATE `notes` SET note='{$_POST['text']}' WHERE id_note = '{$_POST['id']}'");
header('Location: index.php');
}
?>
mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);
после этого пхп будет писать реальную причину ошибки, а не эту ерунду.