Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to make Previous or Next page funtion in a frame?

Status
Not open for further replies.

raulgh

Programmer
Aug 20, 2003
20
SG
Dear all:

I am newbie to HTML and have been asking several simple questions for a couple of days in this forum. Thanks a lot for your guys help. But this time, I really have a pretty advanced question. How to make the frame display only a portion of the result and allows users to click "previous" or "next" link to travel forward or backward to the rest of the portion. Something like Google's search result. When user click previous or next, the page will change accordingly.

 
I know it is pretty difficult and can't be accomplished usig HTML only. I intend to do it using PHP, could someone pls highlight to me how to do it? Thanks a lot...
 
the PHP forum wil help u better. there are already a lot of posts that has been asnwered for this problem. ( i myself explained it once)...

Known is handfull, Unknown is worldfull
 
Thanks a lot vbkris. I will look for it there.
 
Hi vbkris, juz now I check the PHP forum, but I couldn't find the relevent post. It is not in the FAQ session as well. Is it possible that you give a link to those posts or do you still remember roughly when did you answer that question in the PHP forum?
 
If doing this is php keep track of the result length and the current result

ie if your results have a total of 50 values but you only show 10 results per page then...

keep track of the current page number by passing it back to php thru the querystring.

Once you have got your results check the querystring for the curent page number then loop from the
(current page number * no. of results per page) to
((current page number * no. of results per page) + no. of results per page)

hopefully you get the picture

on error goto hell
 
raulgh,
i will give u a start. in mysql u have the capability to pick certain number of records just like that:
e.x:
$sql="select * from table limit 5,10"

will throw 10 records from the 5th record...

Known is handfull, Unknown is worldfull
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top