PHP
<?php
// home titels laden
$news = mysql_query("SELECT nieuws_id, nieuws_title, nieuws_tekst FROM nieuws ORDER BY nieuws_id DESC LIMIT 1");
if(mysql_num_rows($news) == 0)
{
// geen nieuws
}
else
{
$row = mysql_fetch_assoc($news);
echo '<h1>'.$row['nieuws_title'].'</h1>
<h2>
'.substr($row['nieuws_tekst'], 0, 20).'<br/>
<a href=" SITE/nieuws.php?id='.$row['nieuws_id'].'&p1=vieuw">Lees meer</a>
</h2>';
}
?>
Meer tonen
