<?php
include('db.php');
$id= $_GET['id'];
$query = $link->prepare("SELECT * FROM accreg WHERE `id` = :id");
$query -> bindParam(':id', $id, PDO::PARAM_INT);
$query->execute();
if(!$query)
die($link->errorInfo());
while($row = $query->fetch()) {
echo $row['name'];
}
?>