Здесь я генерирую сообщение об ошибке:
Код: Выделить всё
private function isValidOthers($parentId, $title, $keywords, $description, $status, $slug)
{
if (empty($parentId) || empty($title) || empty($keywords) ||
empty($description) || empty($status) || empty($slug))
{
$_SESSION["error"] = "All inputs are necessary. Please fill all fields.";
header("Location:admin/category_add.php");
exit;
}
}
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/79112982/error-message-in-php-session-is-couldnt-be-reached-after-it-is-generated-in-a[/url]
Мобильная версия