$post5 = '';
if($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['id'])) {
$post5 = selectOne('lk', ['id' => $_GET['id']]);
$id3 = $post5['id_user'];
$familia = $post5['familia'];
$name = $post5['name'];
$otchestvo = $post5['otchestvo'];
$seriapasport = $post5['seriapasport'];
$nomerpasport = $post5['nomerpasport'];
$datepasport = $post5['datepasport'];
$adress = $post5['adress'];
$telephone = $post5['telephone'];
$emale = $post5['emale'];
}
<div class="container">
<form action="user.php" method="post" class="row justify-content-center">
<input type="hidden" name="id" value="<?=$id3; ?>">
<div class="row">
<?php include "../../app/include/sidebar-admin.php"; ?>
<div class="posts col-9">
<div class="row title-table">
<h2>Личный кабинет</h2>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Фамилия</label>
<input name="famil" value="<?=$post5['familia']; ?>" type="text" class="form-control" disabled>
</div>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Имя</label>
<input name="name" value="<?=$post5['name']; ?>" type="text" class="form-control" disabled>
</div>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Отчество</label>
<input name="otch" value="<?=$post5['otchestvo']; ?>" type="text" class="form-control" disabled>
</div>
if($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['id'])) {
$post2 = selectOne('kasko', ['id' => $_GET['id']]);
$id2 = $post2['id_user'];
$categorits2 = $post2['categorits'];
$power2 = $post2['power'];
$brand2 = $post2['brand'];
$year2 = $post2['year'];
$model2 = $post2['model'];
$vin2 = $post2['vin'];
$gosnumber2 = $post2['gosnumber'];
$seriaSTS2 = $post2['seriaSTS'];
$numberSTS2 = $post2['numberSTS'];
$dateSTS2 = $post2['dateSTS'];
$seriapasport2 = $post2['seriapasport'];
$numberpasport2 = $post2['numberpasport'];
$datepasport2 = $post2['datepasport'];
$adres2 = $post2['adres'];
$tel2 = $post2['tel'];
$emale2 = $post2['emale'];
}
<h2>Заявка на получение КАСКО</h2>
<div class="container single1_form">
<form action="kasko.php" method="post" class="row justify-content-center">
<input type="hidden" name="id" value="<?=$id2; ?>">
<div class="row justify-content-center">
<div class="col-6">
<label for="exampleFormControlInput1" class="form-label">Категория ТС</label>
<input name="categorits" value="<?=$post2['categorits']; ?>" type="text" class="form-control" disabled>
</div>
<div class="col-6">
<label for="exampleFormControlInput1" class="form-label">Мощность двигателя (л.с.)</label>
<input name="pow" value="<?=$post2['power']; ?>" type="text" class="form-control" disabled>
</div>
</div>
но он работает и очень хорошо.
А как бы сделали вы?
$post5 = [];
if($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['id'])) {
$post5 = selectOne('lk', ['id' => $_POST['id']]);
$id3 = $post5['id_user'];
$familia = $post5['familia'];
$name = $post5['name'];
$otchestvo = $post5['otchestvo'];
$seriapasport = $post5['seriapasport'];
$nomerpasport = $post5['nomerpasport'];
$datepasport = $post5['datepasport'];
$adress = $post5['adress'];
$telephone = $post5['telephone'];
$emale = $post5['emale'];
}
Illegal string offset 'familia'
$post5 = '';
if($_SERVER['REQUEST_METHOD'] === 'GET' && isset($_GET['id'])) {
$post5 = selectOne('lk', ['id' => $_GET['id']]);
$id = $post5['id_user'];
$familia = $post5['familia'];
$name = $post5['name'];
$otchestvo = $post5['otchestvo'];
$seriapasport = $post5['seriapasport'];
$nomerpasport = $post5['nomerpasport'];
$datepasport = $post5['datepasport'];
$adress = $post5['adress'];
$telephone = $post5['telephone'];
$emale = $post5['emale'];
}
<div class="container">
<form action="user.php" method="get" class="row justify-content-center">
<input type="hidden" name="id" value="<?=$id; ?>">
<div class="row">
<?php include "../../app/include/sidebar-admin.php"; ?>
<div class="posts col-9">
<div class="row title-table">
<h2>Личный кабинет</h2>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Фамилия</label>
<input name="famil" value="<?=$post5['familia']; ?>" type="text" class="form-control" disabled>
</div>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Имя</label>
<input name="name" value="<?=$post5['name']; ?>" type="text" class="form-control" disabled>
</div>
<div class="col-4">
<label for="exampleFormControlInput1" class="form-label">Отчество</label>
<input name="otch" value="<?=$post5['otchestvo']; ?>" type="text" class="form-control" disabled>
</div>