<?php

  $server = "localhost";
  $username = "s4vitar";
  $password = "s4vitar123";
  $database = "Hack4u";

  // Establecer conexión
  $conn = new mysqli($server, $username, $password, $database) or die(mysqli_error($conn));

  $id = $_GET['id'];

  $data = mysqli_query($conn, "select username from users where id = '$id'");

  $response = mysqli_fetch_array($data);

  echo $response['username'];

?>