IF you have named your checkboxes in your HTML code like this:
name="id[]" value='565656' (or string from db)
Then your id values will be contained in $id as an array when passed to the SUBMIT page.
e.g. $id[0] = 64547, id[1] = 83738
Your next job is to count how many elements there are in the id array using:
$num = count($id);
So you can then use a for loop to generate your query.
for($i = 0; $i <= $num; $i++);
{
$sql = "SELECT name, age FROM tablename WHERE id = '$id[$i]' ";
$result = mysql_query($sql, $link);
while($row = mysql_fetch_array($result)){
$name = $row['name'];
$age = $row['age'];
echo $name;
echo $age;
}
}
HTH
Ryan