При заполнении формы, данные не улетают в таблицу. Не понимаю почему
Обработчик:
$id_user = '';
$familia = '';
$name = '';
$otchestvo = '';
$seriapasport = '';
$nomerpasport = '';
$datepasport = '';
$adress = '';
$telephone = '';
$emale = '';
if($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['save'])){
$id_user = trim($_POST['iduserr']);
$familia = trim($_POST['famil']);
$name = trim($_POST['name']);
$otchestvo = trim($_POST['otch']);
$seriapasport = trim($_POST['passer']);
$nomerpasport = trim($_POST['nompas']);
$datepasport = trim($_POST['pasdv']);
$adress = trim($_POST['adpropis']);
$telephone = trim($_POST['telefon']);
$emale = trim($_POST['email']);
if($familia === '' || $name === '' || $otchestvo === '') {
array_push($errMsg, "Не все поля заполнены!");
}else{
$post = [
'id_user' => $id_user,
'familia' => $familia,
'name' => $name,
'otchestvo' => $otchestvo,
'seriapasport' => $seriapasport,
'nomerpasport' => $nomerpasport,
'datepasport' => $datepasport,
'adress' => $adress,
'telephone' => $telephone,
'email' => $emale,
];
$id = insert('lk', $post);
}
}
Кусок с формы:
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Фамилия</label>
<input name="famil" value="<?=$post['familia']; ?>" type="text" class="form-control" >
</div>
Кнопка:
<a href="lk.php?save=<?=$post['id'];?>" class="btn">Сохранить</a>