<?php
include "../config/database.php";

// Pastikan parameter username ada agar tidak error undefined index
$username = isset($_GET['username']) ? $_GET['username'] : '';

// Perbaikan pada bagian SELECT fullname (Hapus tanda bintangnya)
$sql = "SELECT fullname FROM user WHERE username = '$username'";
$result = mysqli_query($connection, $sql);

if ($result && mysqli_num_rows($result) > 0) {
    while ($row = mysqli_fetch_assoc($result)) {
        echo $row['fullname'];
    }
} else {
    echo "data tidak ada";
}
?>