Hello,i have the following html page.

<html>
<head>
</head>
<body>
<div class="container">

<div class="8">
<?php $firstname['1']; ?>
</div>

<div class="8">
<?php $firstname['2']; ?>
</div>

<div class="8 last">
<?php $firstname['3']; ?>
</div>

<div class="8">
<?php $firstname['4']; ?>
</div>

<div class="8">
<?php $firstname['5']; ?>
</div>

<div class="8 last">
<?php $firstname['6']; ?>
</div>
<div class="24">
<?php $pagination; ?>
</div>
</div>
</body>
</html>

As you see,i getting records from the database and displaying them.What i want is if a user clicks page two,$firstname; becomes $firstname; since 6 was the last record on page one and $firstname; becomes 8 and so forth.Is this the best approach or is there a better way?.
I

You will have to pass a page number back to your PHP file, and retrieve the next set of data. Search this forum for pagination.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.