PHP-Code:
	
	
<?php
include("config.php");
$limit = $_GET['limit'];
if (empty($limit) || !isset($limit)) {
    $limit = 1;
}
$query = mysql_query("SELECT * FROM tpp_news ORDER BY date DESC LIMIT $limit");
if (!mysql_fetch_object($query)) {
    echo "Es sind keine Einträge vorhanden!<br>";
}
while ($ds = mysql_fetch_object($query)) {
    $title = $ds -> title;
    $autor = $ds -> autor;
    $date = $ds -> date;
    $content = $ds -> content;
    $content = htmlentities($content);
    $content = nl2br($content);
    echo "<table width=\"450\" border=\"0\" class=\"td\"><tr><td class=\"tdhead\">";
    echo "<font size=\"4\"><b><u>$title</b></u></font>";
    echo "</tr></td><tr><td class=\"td\"><font size=\"2\">";
    echo "Geschrieben am ". mysql_query("SELECT DATE_FORMAT('$date', '%d.%m.%y')");
    echo "um ". mysql_query("SELECT DATE_FORMAT('$date', '%H:%i')"). "Uhr";
    echo "von $autor</font></td></tr><tr><td class=\"td\">";
    echo "$content";
    echo "</td></tr></table><br><br>";
}
?>

Wahrscheinlich ist das jetzt wieder so ein saukleiner Fehler den ich auch hätte finden können, habe ich aber nicht
 Hoffentlich kann mir jmd. helfen...
icecream
          
 Moderator
							
						
Kommentar