PDA

View Full Version : Next - Previous page (emergency)


Mecho
10-19-2007, 04:00 PM
Hi ,

i want to make a Next - Previous page function in one site , so if ppl click on Next they will redirect to Second and ... pages and when they click on Previous button they will back to the Previous pages and main page ..

i would appreciate if someone help me . thanks :up:

MoT3rror
10-20-2007, 02:46 AM
Here is a article about paging.
https://vborg.vbsupport.ru/showthread.php?t=120540&highlight=pages

Mecho
10-20-2007, 11:31 AM
Thanks man . but that Article is for VBulletin .. i need that code for other kind of site ..

thanks anyway

Opserty
10-20-2007, 12:12 PM
You can adapt it to what you need most of the work is here which is fairly independent of vB:

/*================================================= =====*\
* Taken from: https://vborg.vbsupport.ru/showthread.php?t=120540
\*================================================ ======*/

// Default lower and upper limit variables
$limitlower = ($pagenumber - 1) * $perpage + 1;
$limitupper = $pagenumber * $perpage;
if ($limitupper > $bannedcount['bannedcount'])
{
// Too many for upper limit
$limitupper = $bannedcount['bannedcount'];
if ($limitlower > $bannedcount['bannedcount'])
{
// Too many for lower limit
$limitlower = $bannedcount['bannedcount'] - $perpage;
}
}
if ($limitlower <= 0)
{
// Can't have negative or null lower limit
$limitlower = 1;
}

$pagenumber - Current page your on
$perpage - Number of X's to display on each page
$bannedcount['bannedcount'] - The number of the total X's

Mecho
10-20-2007, 01:08 PM
u mean i have to add this code to my page then make buttons ??? if so would u plz tell me how can i buttons too ?
how i put commands for those buttons ( next/Previous )

sorry but i'm soooo noob in these stuff but i have to make these 2 button in the page . thanks

Mecho
10-28-2007, 09:24 PM
anyone ???