You are here: Re: how do I append a variable to a url that already contains variables? « HTML « IT news, forums, messages
Re: how do I append a variable to a url that already contains variables?

Posted by PseudoMega on 12/19/06 14:45

Consider this example:

A google search for the word "pagination" with my preferences set to
100 results per page.

After hitting the search button, this is the URL:
http://www.google.com/search?num=100&hl=en&lr=&q=pagination&btnG=Search

The links at the bottom of the page for "previous", "next" and the
individual page numbers are as such:
http://www.google.com/search?q=pagination&num=100&hl=en&lr=&start=100&sa=N
http://www.google.com/search?q=pagination&num=100&hl=en&lr=&start=200&sa=N
http://www.google.com/search?q=pagination&num=100&hl=en&lr=&start=300&sa=N
and so on...

The 'q', 'num' and 'hl' variables remain, while the 'start' variable is
added to the mix as an offset for page numbering. I need to basically
emulate this, but the 'start' variable will be the 'page' variable in
my situation. This needs to fit with my dynamic pagination code which
creates links based on the number of results encountered in the
database.

BootNic and Toby: your suggestions seem along the right track, but I
need these to be text links just like Google's. Also, in addition to
the text links, my pagination code creates a drop down select menu with
an entry for each available page number.

Thanks for all the suggestions so far. I hope this makes it more clear
though.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация