Sjoerd schreef:#meldingen divAls je het nieuwste bericht bovenin zet, moet je ook het id van het eerste kind in #messages gebruiken ipv de laatste.
Hoe ziet je while-block er trouwens uit? show-meldingen.php haalt max. 10 berichten op uit de database, maar als ik zo naar je console logs kijk, lijkt het erop dat hij er maar eentje terugstuurt..
irstwerkt niet?
Spoiler tonen
[COLOR= #0000BB]<?php
$getMeldingen[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$db[/COLOR][COLOR= #007700]->[/COLOR]query[COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM meldingen WHERE id > "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$db[/COLOR][COLOR= #007700]->[/COLOR]real_escape_string[COLOR= #007700]([/COLOR][COLOR= #0000BB]$_GET[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]]).[/COLOR][COLOR= #DD0000]" ORDER BY id DESC LIMIT 10"[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$fetchMeldingen[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #0000BB]$getMeldingen[/COLOR][COLOR= #007700]->[/COLOR]fetch_array[COLOR= #007700]()){[/COLOR]
?>
<div class="melding-title">[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fetchMeldingen[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]melding[/COLOR][COLOR= #007700]];[/COLOR] ?></div>
<div class="melding column">
<div data-id="[COLOR= #0000BB]<?php[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$fetchMeldingen[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]id[/COLOR][COLOR= #007700]];[/COLOR] ?>"></div>
</div>
[COLOR= #0000BB]<?php[/COLOR] [COLOR= #007700]}[/COLOR] ?>
25:
22:
?