[COLOR= #0000BB]<?
$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"select * from datum_ order by id DESC limit 1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/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]$object[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$object[/COLOR][COLOR= #007700]->[/COLOR]datum[COLOR= #007700]);
}[/COLOR]
?>
[COLOR= #0000BB]<?
$query[/COLOR] [COLOR= #007700]=[/COLOR] [COLOR= #DD0000]"select * from titel_ order by id DESC limit 1"[/COLOR][COLOR= #007700];[/COLOR]
[COLOR= #0000BB]$result[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_query"]mysql_query[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$query[/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]$object[/COLOR] [COLOR= #007700]=[/COLOR] [URL="http://www.php.net/mysql_fetch_object"]mysql_fetch_object[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$result[/COLOR][COLOR= #007700])){[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [URL="http://www.php.net/nl2br"]nl2br[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$object[/COLOR][COLOR= #007700]->[/COLOR]titel[COLOR= #007700]);
}[/COLOR]
?> Ik gebruik dit de hele tijd. Maar het is heel véél werk daarom zoek ik een ander oplossing maar welke? Ik ken dit alleen tot nu toe om het op de volgende manier te doen:
Je schrijft in admin de titel in een aparte input de tekst en de datum dus 3 dingen apart
Deze pakt hij en zet hij in de database
Vervolgens zet ik op de index dat hij ze uit de database haalt
Maar kan dit niet makkelijker?
1 punt beloning
