<?php
include "/includes/db.php";
$id = $_GET['id'];
$options = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
];
$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password, $options);
$id = $_GET['id'];
$query = $pdo->prepare('SELECT * FROM nametable WHERE id = ? ORDER BY nameselect DESC');
$query->execute([$id]);
?>
<html>
<?php foreach($query as $row ?>
$row ['namerow']
<?php } ?>
</html>