As per the comments I added earlier, there's a number of things to keep in mind here.
You need to know:
(1) Which 'page' you'd like to display
(2) How many results you'd like to display on each page.
I've chosen to display the information for each user in a single-row html table. The first cell contains an image, while the second cell contains text information.
I've used single quotes - ' wherever the string doesn't need interpreting. I've used double-quotes " whenever the string contains a php variable that should be substitued by it's value. (It's faster to use single quotes, more functional to use double quotes) - You should consider the code that outputs the image as being wrapped in double-quotes. In this case the string contains an interpreted value inside of single quotes. This will equate to single quotes wrapped around some text value.
$sql = "select some stuff limit $firstEntryToShow $lastEntryToShow";
$result = mysql_query($sql);
while ($row = mysql_fetch_row($result))
{
$photoSrc = $row[0];
$profileId = $row[1];
$name = $row[2];
$address = $row[3];
$qualif = $row[4];
echo '<table>';
echo '<tbody>';
echo "<tr>";
echo "<td><img src='$photoSrc'/></td>";
echo "<td>Profile ID: $profileId<br>Name: $name<br>Address: $address<br>Qualification: $qualif</td>";
echo '</tr>';
echo '</tbody>';
echo '</table>';
}
You can set the $firstEntryToShow by taking a variable that specifies which page you'd like to view, and multiplying that value with the number of records your'd like to display on each page. You can then calculate $lastEntryToShow by adding $numEntriesPerPage-1 to $firstEntryToShow.
Note: the code below assumes that the url contains a variable named pgnum
E.g: http://www.somehost.com/someFile.php?pgnum=1
$pageNumber = $_GET['pgnum'];
$numEntriesPerPage = 7;
$firstEntryToShow = $pageNumber * $numEntriesPerPage;
$lastEntryToShow = $firstEntryToShow + ($numEntriesPerPage-1);
You can use isset to see if the variable has been given.
e.g:
if (isset($_GET['pgnum']))
$pageNum = $_GET['pgnum'];
else
$pageNum = 0;