Lieve leden 
Na een periode van inactiviteit heb ik mijn weg naar het eens zo gezellige one2xs-forum weer gevonden. Destijds heb ik het forum achter me gelaten ivm de grimmige sfeer die hier hing. Ik kon het echter toch niet missen dus ben ik weer terug, en hoop de sfeer inmiddels is wedergekeerd
Goed, genoeg gezeverd, ik heb jullie hulp nodig!
Voor mijn carnavalsvereniging (waar jullie allemaal vast al van gehoord hebben
) ben ik bezig met het gastenboek. Ik wil enkele kleine wijzigingen doorvoeren.
Het is allemaal echter niet zo optimaal gescript, maar ik heb er de tijd en zin niet voor om alles te gaan herscripten. Dus, het probleem is het volgende. Mijn pagina-systeem staat nu bovenaan de pagina, echter is dit heel onhandig. Het is dan noodzakelijk om eerst te scrollen om naar de volgende pagina te gaan. Daarom zou ik graag het pagina-systeem onderaan de pagina willen hebben. Dit levert uiteraard problemen op in verband met de variabelen die her en der gebruikt worden.
Goed, een gedeelte code dan maar:
Dit stukje code wordt gebruikt om de gastenboekberichten op te halen van het aantal berichten dat met het pagina-systeem is opgevraagd.
Hieronder volgt het pagina-systeem:
Ik had gehoopt dat het allemaal zou werken als ik gewoon het pagina-systeem onderaan plak, dit is echter niet het geval
Wie heeft voor mij de perfecte oplossing?

Na een periode van inactiviteit heb ik mijn weg naar het eens zo gezellige one2xs-forum weer gevonden. Destijds heb ik het forum achter me gelaten ivm de grimmige sfeer die hier hing. Ik kon het echter toch niet missen dus ben ik weer terug, en hoop de sfeer inmiddels is wedergekeerd

Goed, genoeg gezeverd, ik heb jullie hulp nodig!
Voor mijn carnavalsvereniging (waar jullie allemaal vast al van gehoord hebben
) ben ik bezig met het gastenboek. Ik wil enkele kleine wijzigingen doorvoeren.Het is allemaal echter niet zo optimaal gescript, maar ik heb er de tijd en zin niet voor om alles te gaan herscripten. Dus, het probleem is het volgende. Mijn pagina-systeem staat nu bovenaan de pagina, echter is dit heel onhandig. Het is dan noodzakelijk om eerst te scrollen om naar de volgende pagina te gaan. Daarom zou ik graag het pagina-systeem onderaan de pagina willen hebben. Dit levert uiteraard problemen op in verband met de variabelen die her en der gebruikt worden.
Goed, een gedeelte code dan maar:
[COLOR= #0000BB]<?
$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT *, UNIX_TIMESTAMP(datum) AS t_datum FROM gastenboek WHERE nieuws = nee ORDER BY id DESC LIMIT "[/COLOR][COLOR= #007700].([/COLOR][COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]*[/COLOR] [COLOR= #0000BB]20[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]20[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]","[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$max[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] htmlentities[COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$ubb[/COLOR] [COLOR= #007700]= new[/COLOR] UBB[COLOR= #007700]([/COLOR][COLOR= #DD0000]huje[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/stripslashes"]stripslashes[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$list[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]bericht[/COLOR][COLOR= #007700]]);[/COLOR]
[COLOR= #0000BB]$bericht[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$ubb[/COLOR][COLOR= #007700]->[/COLOR]UBB[COLOR= #007700]([/COLOR][COLOR= #0000BB]$bericht[/COLOR][COLOR= #007700]);[/COLOR]
?> Dit stukje code wordt gebruikt om de gastenboekberichten op te halen van het aantal berichten dat met het pagina-systeem is opgevraagd.
Hieronder volgt het pagina-systeem:
[COLOR= #0000BB]<?php
$max[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]20[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// aantal berichten per pagina.[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM gastenboek ORDER BY id DESC"[/COLOR][COLOR= #007700])[/COLOR] or [URL="http://www.php.net/die"]die[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/mysql_error"]mysql_error[/URL][COLOR= #007700]());[/COLOR]
[COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_num_rows"]mysql_num_rows[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$aantal[/COLOR] /[COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$max[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/ceil"]ceil[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR][COLOR= #0000BB]$aantal[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])
{[/COLOR]
[URL="http://www.php.net/print"]print[/URL] [COLOR= #DD0000]"Het gastenboek is leeg."[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/else"]else[/URL]
[COLOR= #007700]{[/COLOR]
[COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/is_numeric"]is_numeric[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]]) &&[/COLOR] [URL="http://www.php.net/intval"]intval[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/abs"]abs[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]])) ==[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]] &&[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]] <=[/COLOR] [COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]] >[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700])[/COLOR]
[COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]nav[/COLOR][COLOR= #007700]];[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]1[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]<a href="gastenboek.php?nav=1">«</a> [/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// de string waarin de rij paginanummers komt[/COLOR]
[COLOR= #0000BB]$ervoor[/COLOR] [COLOR= #007700]= ([/COLOR][COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$huidige[/COLOR][COLOR= #007700]) <[/COLOR] [COLOR= #0000BB]2[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #0000BB]4[/COLOR] [COLOR= #007700]- ([/COLOR][COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$huidige[/COLOR][COLOR= #007700]) :[/COLOR] [COLOR= #0000BB]2[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]= ([/COLOR][COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$ervoor[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]-[/COLOR] [COLOR= #0000BB]$ervoor[/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #0000BB]1[/COLOR][COLOR= #007700]),[/COLOR] [COLOR= #0000BB]$zien[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]5[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$zien[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #0000BB]$i[/COLOR][COLOR= #007700]++,[/COLOR] [COLOR= #0000BB]$zien[/COLOR][COLOR= #007700]--)
{[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #0000BB]$i[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000]<b>[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</b> [/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000]<a href="gastenboek.php?&nav=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$i[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]</a> [/COLOR][COLOR= #007700];
}[/COLOR]
[COLOR= #0000BB]$str[/COLOR] [COLOR= #007700].=[/COLOR] [COLOR= #0000BB]$huidige[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$totaal[/COLOR] [COLOR= #007700]?[/COLOR] [COLOR= #DD0000][/COLOR] [COLOR= #007700]:[/COLOR] [COLOR= #DD0000] <a href="gastenboek.php?nav=[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$totaal[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]">»</a>[/COLOR][COLOR= #007700];[/COLOR] [COLOR= #FF8000]// zet de laatste pagina erbij[/COLOR]
[COLOR= #007700]}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$str[/COLOR][COLOR= #007700];[/COLOR]
?> Ik had gehoopt dat het allemaal zou werken als ik gewoon het pagina-systeem onderaan plak, dit is echter niet het geval

Wie heeft voor mij de perfecte oplossing?

is dit te omzeilen?
Of bedoel je dat ik die $huidige misschien bovenaan de pagina al aan kan maken? 
), maar ik wil het nu echt op een andere manier op mijn site gaan presenteren 