Ребят привет, помогите новичку в освоении php)
Написал код php сверху над html, далее в html хочу вставить вставить переменную, выдает ошибку
Что я делаю не так? подскажите
Сам код
<?php include $_SERVER['DOCUMENT_ROOT'] . '/src/core.php';
if (isset($_POST['auth'])) {
require $_SERVER['DOCUMENT_ROOT'] . '/data/users.php';
require $_SERVER['DOCUMENT_ROOT'] . '/data/passwords.php';
$email = array_search($_POST['email'], $users_email);
if ($email !== false && $_POST['password'] == $users_password[$email]) {
$auth = true;
if ($auth) {
$showSuccess = true;
}
} else {
$showError = true;
}
}
?>
<!doctype html>
<html class="antialiased" lang="ru">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href="/assets/css/form.min.css" rel="stylesheet">
<link href="/assets/css/tailwind.css" rel="stylesheet">
<link href="/assets/css/base.css" rel="stylesheet">
<?php if ($showSuccess) {
echo 'yes';
};
if ($showError) {
echo 'no';
};
?>
<form action="/login/" method="post">
<div class="mt-8 max-w-md">
<div class="grid grid-cols-1 gap-6">
<div class="block">
<label for="fieldEmail" class="text-gray-700 font-bold">Email</label>
<input id="fieldEmail" name="email" type="email"
class="mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-300 focus:ring focus:ring-indigo-200 focus:ring-opacity-50"
placeholder="john@example.com">