I have a list of profiles, and i need to make the user able to select the individual profile in a link.
I found this question and tried to follow it, but it doesnt quite work as i hoped it would: Displaying a user profile page PHP
The file to display all profiles on the page looks like this:
foreach ($rows as $row) {
echo '<a class="viewProfile" href="user.php?id=' . $r['UID']. '"><button>View Profile</button></a>';
}
But when i click the link the UID doesn't get posted in the URL, and it just looks like this: domain/user.php?id=
Update: With help from you guys i got the UID posted into the URL. Thanks! And as jothi stated $id=$_GET['id'];