idを何らかのパラメータとして持つアンカータグで名前を囲みます。
私は2つのテンプレートで1つはすべてのユーザー(userList.php)を一覧表示し、もう1つはユーザーに関する詳細情報(userInformation.php)を表示します。
userList.php:
<table>
<tr>
<th>
<a href="userInformation.php?id=<?php echo $user->id;?>">
<?php echo $user->username;?>
</a>
</th>
<td><?php echo $user->email;?></td>
<td><?php echo $user->propN;?></td>
</tr>
...
...
</table>
userInformation.php:
<?php
$userId = $_POST['id'];
$user = someFunctionForGettingTheUserPerhaps($userId);
?>
<table>
<tr>
<th><?php echo $user->username;?></th>
<td><?php echo $user->email;?></td>
<td><?php echo $user->password;?></td>
<td><?php echo $user->name;?></td>
<td><?php echo $user->propN;?></td>
...
...
</tr>
</table>
EDIT: '' 置き換え後者はPHPのプロパティアクセサ表記法であるため、 ' - >'を使用します。
'$ user-username'を' $ user-> username'に置き換えます。phpのピリオドは文字列連結演算子です。 –
非常に重要なポイントです。私のPHPは少し鮮明に見える.. – heikkim