'; // Getting the input parameter (user): $user = $_REQUEST['user']; // Get the attributes of the user with the given username $query = "SELECT email, full_name, gender, age FROM Users WHERE username = '$user'"; $result = mysqli_query($dbcon, $query) or die('Query failed: ' . mysqli_error($dbcon)); // Can also check that there is only one tuple in the result $tuple = mysqli_fetch_array($result, MYSQL_ASSOC) or die("User $user not found!"); print "User $user has the following attributes:"; // Printing user attributes in HTML print ''; // Free result mysqli_free_result($result); // Closing connection mysqli_close($dbcon); ?>