Please help me.I am new to PHP.I dont have any idea.

For Example,i had set of 100 records in the table.

Sample Design:PREVIOUS 1 2 3 4 NEXT

Using PHP :if i click 1 (first 10 records must be list out in the web page)

and then if click 2(from 11th record to 20th record must be list out in the web page)

finally if i click NEXT BUTTON 5 must be appear(from 50th record should start.........)


If you are using a MySQL database, you can easily limit the returned results in a query with the use of the LIMIT function. For example:

$sql = "SELECT * FROM messages WHERE userId = $userId LIMIT(0,30)";

displays the first thirty records. If I had LIMIT(30,60) that would display the next 30 and so on.

If you don't have a MySQL database, try googling for an equivalent function in your preferred SQL engine.