hallo,
Ik wil graag dat 5 Random dingen getoond worden inplaats van alles
Weet een van jullie hoe dat moet?
Dit heb ik nu:
Kan een van jullie laten zien hoe het wel moet?
Ik wil graag dat 5 Random dingen getoond worden inplaats van alles
Weet een van jullie hoe dat moet?Dit heb ik nu:
<div id="container">
<p class="news">
Verhalen
</p><p>
Lees hier verhalen over andere mensen<BR><BR>
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]//error reporting [/COLOR]
[URL="http://www.php.net/error_reporting"]error_reporting[/URL] [COLOR= #007700]([/COLOR]E_ALL[COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// gegevens van de berichtenbalk ophalen uit de database [/COLOR]
[COLOR= #0000BB]$verhalen[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]"SELECT * FROM `verhalen` 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]<?php[/COLOR]
[COLOR= #FF8000]//berichtenbalk weergeven [/COLOR]
[URL="http://www.php.net/while"]while[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$rij[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_assoc"]mysql_fetch_assoc[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$verhalen[/COLOR][COLOR= #007700]))
{[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #DD0000]"<b>"[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]naam[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]"</b> <br> "[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$rij[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]verhaal[/COLOR][COLOR= #007700]].[/COLOR][COLOR= #DD0000]" <BR><BR> "[/COLOR][COLOR= #007700];
}[/COLOR]
?>
</p><p></p>
<p class="meta"><a href=?p=paginas/verhaal_toevoegen>Voeg hier je eigen verhaal toe.</a></p>
</div> Kan een van jullie laten zien hoe het wel moet?
