SQL PHP HTML ASP JavaScript articles and free scripts to download

Selection of number of records per page by the user in php paging script

Users can select the number of records they want to see per page in the paging script. This customization of the existing paging script can be done by using a drop down box and visitors can select the value for number of records per page. Once this value is selected the value is to be carried to all subsequent pages of paging script. We will be using the query string to pass the value of number of records per page by adding the name value payer to the links at the bottom.

Note that when the page first opens there is no selection for the number of records per pages so we have given a default value of 10 to this. Any point of time if the user gives the selection for number of records from the drop down list box then the data will be submitted to the first page only. This way we can ensure that any change always starts from first page only.

If you don't want this to happen and once the visitor is changing number of records the page should start from current page itself ( without going to first page ) then you have to add the value of start within the form by using one hidden tag.

<input type=hidden name=start value=$start>
This is also explained in the downloaded demo file.    

Demo of paging script with User selection ( records per page) by dropdown list


Google+
Post Comment This is for short comments only. Use the forum for more discussions.
Name
Email( not to be displayed)Privacy Policy
1+2=This is to prevent automatic submission by spammers. Please enter the result of the sum as asked



Join Our Email List
Email:  
For Email Newsletters you can trust
HTML . MySQL. PHP. JavaScript. ASP. Photoshop. Articles. FORUM Contact us

©2000-2014 plus2net.com All rights reserved worldwide Privacy Policy Disclaimer