Hoi
Ik ben bezig met een forum die af is. Alleen nog 1 ding ik heb zon pagina systeem met 5 reacties bijvoorbeeld, alleen het probleem is hoe krijg ik voor elkaar als ik een reactie plaatst dat hij op de laatste pagina komt.
Pagina navigatie code:
< = pagina terug
<< = eerste pagina
> = pagina verder
>> = laatste pagina
Dit is van reactie plaatsen:
Zo link krijg je als je naar een volgende pagina gaat: ?p=forum&cat=6&b=21&start=10
Ik hoop dat iemand me kan helpen want ik kom er niet meer uit
.
Ik ben bezig met een forum die af is. Alleen nog 1 ding ik heb zon pagina systeem met 5 reacties bijvoorbeeld, alleen het probleem is hoe krijg ik voor elkaar als ik een reactie plaatst dat hij op de laatste pagina komt.
Pagina navigatie code:
[COLOR= #0000BB]<?php[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$first_last_link[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=?p=forum&cat="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&b="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&start=0><<</a> "[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=?p=forum&cat="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&b="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&start="[/COLOR][COLOR= #007700].([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]start[/COLOR][COLOR= #007700]] -[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]"><</a>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/for"]for[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$j[/COLOR][COLOR= #007700]=[/COLOR][COLOR= #0000BB]$pagina[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$j[/COLOR][COLOR= #007700]<[/COLOR][COLOR= #0000BB]$pagina[/COLOR][COLOR= #007700]+[/COLOR][COLOR= #0000BB]10[/COLOR][COLOR= #007700];[/COLOR][COLOR= #0000BB]$j[/COLOR][COLOR= #007700]++) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$j[/COLOR] [COLOR= #007700]>[/COLOR] [COLOR= #0000BB]0[/COLOR] [COLOR= #007700]&&[/COLOR] [COLOR= #0000BB]$j[/COLOR] [COLOR= #007700]<=[/COLOR] [COLOR= #0000BB]$paginas[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$j[/COLOR] [COLOR= #007700]==[/COLOR] [COLOR= #0000BB]$pagina[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<strong>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$pagina[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"</strong>"[/COLOR][COLOR= #007700];
}[/COLOR][URL="http://www.php.net/else"]else[/URL][COLOR= #007700]{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=?p=forum&cat="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&b="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&start="[/COLOR] [COLOR= #007700]. (([/COLOR][COLOR= #0000BB]$j[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])*[/COLOR][COLOR= #0000BB]$per_pagina[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]">"[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #0000BB]$j[/COLOR] [COLOR= #007700].[/COLOR] [COLOR= #DD0000]"</a>"[/COLOR][COLOR= #007700];
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700];
}
}[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=?p=forum&cat="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&b="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&start="[/COLOR][COLOR= #007700].([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]start[/COLOR][COLOR= #007700]] +[/COLOR] [COLOR= #0000BB]10[/COLOR][COLOR= #007700]).[/COLOR][COLOR= #DD0000]">></a>"[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]" "[/COLOR][COLOR= #007700];[/COLOR]
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$first_last_link[/COLOR][COLOR= #007700]) {[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<a href=?p=forum&cat="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&b="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"&start="[/COLOR] [COLOR= #007700]. (([/COLOR][COLOR= #0000BB]$paginas[/COLOR][COLOR= #007700]-[/COLOR][COLOR= #0000BB]1[/COLOR][COLOR= #007700])*[/COLOR][COLOR= #0000BB]$per_pagina[/COLOR][COLOR= #007700]) .[/COLOR] [COLOR= #DD0000]">>></a>"[/COLOR][COLOR= #007700];
}[/COLOR]
?> < = pagina terug
<< = eerste pagina
> = pagina verder
>> = laatste pagina
Dit is van reactie plaatsen:
<form name="form1" action="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]];[/COLOR] ?>?p=forum&cat=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]cat[/COLOR][COLOR= #007700]];[/COLOR] ?>&b=[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]b[/COLOR][COLOR= #007700]];[/COLOR] ?>&a=reactie" method="post"> Zo link krijg je als je naar een volgende pagina gaat: ?p=forum&cat=6&b=21&start=10
Ik hoop dat iemand me kan helpen want ik kom er niet meer uit
.