<?php
include('constant/connect.php');

$id = $_GET['id'];

$res = $connect->query("SELECT * FROM appointments WHERE id='$id'");
$row = $res->fetch_assoc();

echo "
<b>Name:</b> {$row['patient_name']} <br>
<b>Phone:</b> {$row['phone']} <br>
<b>Doctor:</b> {$row['doctor_id']} <br>
<b>Date:</b> {$row['date']} <br>
<b>Time:</b> {$row['time']}
";
?>