<?php
if (isset($_GET['cid'])) {
$id = ($_GET['cid']);
} else {
echo
"Deze client is nog niet juist aangemaakt.";
}
$sql = "SELECT * FROM forms WHERE Client_ID ='$id'";
$result = $con->query($sql);
if (mysqli_num_rows($result) > 0) {
$username = 'how to get this value here ?';
echo $username;
while($row = mysqli_fetch_array($result)) {
This is my code. I want show the username of the user and in the while loop all the data that has been collected over the years. Just like a header above all data. I am farely new to php and mysqli. Can anyone help me how to get the username out of the table and echo it before the while loop ?