am summarizing ur needs
- You want to list the whole users in a table
- Each user has a view link near to each row
- when u click on it, u want to show his/her full details in another page
PHP Code:
$get_users = "SELECT `id`, `firstname` FROM `your_table` ORDER BY `id`;
$get_users_qr = mysql_query($get_users);
while($get_users_obj = mysql_fetch_array($get_users_qr)) {
echo $get_users_obj['firstname']." <a href='details.php?id=".$get_users_obj['id']."'>View Details</a><br/>";
}
This will list your whole db users list with view details link
=============================================
In details.php
get the id and list its details
PHP Code:
$user_id = $_GET['id'];
$get_details = "SELECT * FROM `your_table` WHERE `id`='".$user_id."'";
$get_details_qry = mysql_query($get_details);
if($get_details_obj = mysql_fetch_array($get_details)) {
echo "First Name:".$get_details_obj['firstname'];
echo "<br> Last Name:".$get_details_obj['lastname'];
}