Retrieving Data from Database and showing on a scroll list?

i have succeeded after loots of effort to make a game that sends data to a database! yay for me. now well i need to retrieve that data and show them on a panel on gameover preferably in a scroll list. so for sending them i used UnityWebRequest.Post so naturally i tried using the UnityWebRequest.Get but i get internal errors.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;

public class DataBaseGet : MonoBehaviour
{
    public void GetData()
    {
        // A correct website page.
        StartCoroutine(GetRequest("http://localhost/sqlconnect/showScoreboard.php"));
    }

    IEnumerator GetRequest(string uri)
    {
        using (UnityWebRequest webRequest = UnityWebRequest.Get(uri))
        {
            // Request and wait for the desired page.
            yield return webRequest.SendWebRequest();

            string[] pages = uri.Split('/');
            int page = pages.Length - 1;

            switch (webRequest.result)
            {
                case UnityWebRequest.Result.ConnectionError:
                case UnityWebRequest.Result.DataProcessingError:
                    Debug.LogError(pages[page] + ": Error: " + webRequest.error);
                    break;
                case UnityWebRequest.Result.ProtocolError:
                    Debug.LogError(pages[page] + ": HTTP Error: " + webRequest.error);
                    break;
                case UnityWebRequest.Result.Success:
                    Debug.Log(pages[page] + ":\nReceived: " + webRequest.downloadHandler.text);
                    break;
            }
        }
    }
}

now i didint change anything on the script so i dont know if it can work that way. And my php file is straight from www3schools

<?php

    $servername = "localhost";
    $username = "root";
    $password = "root";
    $dbname = "nicknameget";

    // Create connection
    $conn = mysqli_connect($servername, $username, $password, $dbname);
    // Check connection
    if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
    }

    $sql = "SELECT * FROM players ORDER BY score DESC LIMIT 100";
    $result = $conn->query($sql);

    if ($result->num_rows > 0) {
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo "id: " . $row["nickname"]. " - Name: " . $row["score"]. " "  "
";
    }
    } else {
    echo "0 results";
    }
    $conn->close();

?>

so i would deeply appreciate some help or a proper tutorial for doing so! thank you!

i also made it like this but it didnt return anything

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.Networking;

public class DataBaseGet : MonoBehaviour
{

    public void ShowScore()
    {
        StartCoroutine(Retrieve());
    }
    public IEnumerator Retrieve()
    {
       using (UnityWebRequest webRequest = UnityWebRequest.Get("http://localhost/sqlconnect/showScoreboard.php"))
        {
            yield return webRequest.SendWebRequest();
            string[] pages = ("http://localhost/sqlconnect/showScoreboard.php").Split('/');
            int page = pages.Length - 1;
            if (webRequest.isNetworkError)
            {
                Debug.Log(pages[page] + ": Error: " + webRequest.error);
            }
            else
            {
                Debug.Log(pages[page] + ":\nReceived: " + webRequest.downloadHandler.text);
            }
        }
    }
}

Now is not the time to be vague about the errors you’re getting. Dig into the errors and they will help you figure out what’s wrong.

well it was a 500 from what i remember, now that ive tinkered with the code it doesnt show any errors but neither does it print the data i want

Ok! so it worked. managed to get it right and it can show in the console the data but now to my other question how can i make that go into a nice scroll list in a panel?