You can do this in many ways
In all, you need an Identifier to recognize each User(Record)
Hope you have an ID to do this in table
So your while loop will be
while($userReport = mysql_fetch_assoc($users)){
//var_dump($userReport) ;
?>
<tr>
<td><?=$userReport["concat(u.first_name, ' ', u.last_name)"]?></td>
<td><?=$userReport['project_name']?></td>
<td><?=$userReport['contact']?></td>
<td ><a href="edit_user.php?id=<?=$userReport['id']
?>">Edit</a></td>
</tr>
<?
}
So that when you click on Edit link of a user it calls the edit_user.php with a GET variable id contains its identifier.
In another method you can pass the Id as a POST Variable.
Here we need to do this using Javascript, with the help of a hidden variable
PHP Code:
<script language="javascript">
function edit_user(user_id) {
document.getElementById('user_id_for_edit').value = user_id;
document.frm_details.submit();
}
</script>
<form name="frm_details" action="edit_user.php" method="post">
<input type="hidden" name="user_id_for_edit" id="user_id_for_edit" value="" />
<?
$users = getUsers() ;
while($userReport = mysql_fetch_assoc($users)){
//var_dump($userReport) ;
?>
<tr>
<td><?=$userReport["concat(u.first_name, ' ', u.last_name)"]?></td>
<td><?=$userReport['project_name']?></td>
<td><?=$userReport['contact']?></td>
<td><a href="javascript:edit_user('<?=$userReport['id']?>')">Edit</a></td>
</tr>
<?
}
?>
</form>
(Code not Tested!)
Regards
Anees