I found couple of problems in the code:
members.php
while($row = $result->fetch_assoc()){
printf ('<li><a href="profiles.php?memberID=' . urlencode($row['memberID']) . '">' . $row['name'] . '</a></li>');
}
Here you are using printf
function which have 1st argument for format of string.
Correct that with echo
statement as below:
while($row = $result->fetch_assoc()){
echo '<li><a href="profiles.php?memberID=' . urlencode($row['memberID']) . '">' . $row['name'] . '</a></li>';
}
profiles.php
$id = isset($_GET['memberID']);
Here you are setting the $id
with isset() function return value.
You should instead set the value from GET parameter as below:
if(isset($_GET['memberID'])) $id = $_GET['memberID'];
See now if it's working.