pxlArtizzt
Erfahrenes Mitglied
was passiert denn mit dem Datum?
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
while($row = mysql_fetch_array($abfragen))
{
$name1 = $row["name"];
$wohnort1 = $row["wohnort"];
$email1 = $row["email"];
$homepage1 = $row["homepage"];
$kommentar1 = $row["kommentar"];
$id = $row["id"];
// HIER DIESE ZEILE MUSST DU ÄNDERN
$datum = $row["datum"];
$datum1 = date("d.m.Y - H:i", $datum);
$datum1 .=" Uhr";
$kommentar1 = nl2br($kommentar1);
//Im Kommentar wird automatisch nach 65 zeichen ein Zeilenumbruch eingefügt
$kommentar1 = wordwrap($kommentar1, 65, "<br>\n", 1);
echo "<table align='center' border='0' width='90%' cellpadding='1' cellspacing='1'>";
echo "<tr>";
echo "<td bgcolor='#FF962D' width='10%'>Nr. $id</td>";
echo "<td bgcolor='#8EE6E6' width='65%'><a href='mailto:$email'>$name1</a> aus $wohnort1</td>";
echo "<td bgcolor='#5FC44D' width='10%'><div align='center'><a href='http://$homepage1'><img src='homepage.gif' alt='zur homepage von $name1' border='0'></a></div></td>";
echo "<td bgcolor='#E73930' width='15%'><font size='-1'>$datum1</font></td>";
echo "</tr>";
echo "</table>";
echo "<table align='center' border='0' width='90%' cellpadding='1' cellspacing='1'>";
echo "<tr>";
echo "<td bgcolor='#ff00ff' width='85%'>$kommentar1</td>";
echo "<td bgcolor='#008000' width='*'> </td>";
echo "</tr>";
echo "</table>";
echo "<br>\n";
}
$eintrag = "INSERT INTO gaestebuch (name, wohnort, email, datum, homepage, kommentar)
VALUES ('$name', '$wohnort', '$email', '$timestamp', '$homepage', '$kommentar')";
$eintrag = "INSERT INTO gaestebuch (name, wohnort, email, datum, homepage, kommentar)
VALUES ('$name', '$wohnort', '$email', UNIX_TIMESTAMP(), '$homepage', '$kommentar')";
<?php
include("../dbconnect.php");
$delid = $_REQUEST["delid"];
$loeschen = "DELETE FROM gaestebuch WHERE id = '$delid'";
mysql_query($loeschen);
if($loeschen)
{
echo "Eintrag $delid gelöscht";
}
else
{
echo "Fehler";
}
?>
mysql_query("update gaestebuch set id=id-1 where id >=$delid");
...
// HIER NE ÄNDERUNG
$eintrag_nr = 1;
while($row = mysql_fetch_array($abfragen))
{
$name1 = $row["name"];
$wohnort1 = $row["wohnort"];
$email1 = $row["email"];
$homepage1 = $row["homepage"];
$kommentar1 = $row["kommentar"];
$id = $row["id"];
$datum = $row["timestamp"];
$datum1 = date("d.m.Y - H:i", $datum);
$datum1 .=" Uhr";
$kommentar1 = nl2br($kommentar1);
//Im Kommentar wird automatisch nach 65 zeichen ein Zeilenumbruch eingefügt
$kommentar1 = wordwrap($kommentar1, 65, "<br>\n", 1);
echo "<table align='center' border='0' width='90%' cellpadding='1' cellspacing='1'>";
echo "<tr>";
// HIER NE ÄNDERUNG
echo "<td bgcolor='#FF962D' width='10%'>Nr. $eintrag_nr</td>";
echo "<td bgcolor='#8EE6E6' width='65%'><a href='mailto:$email'>$name1</a> aus $wohnort1</td>";
echo "<td bgcolor='#5FC44D' width='10%'><div align='center'><a href='http://$homepage1'><img src='homepage.gif' alt='zur homepage von $name1' border='0'></a></div></td>";
echo "<td bgcolor='#E73930' width='15%'><font size='-1'>$datum1</font></td>";
echo "</tr>";
echo "</table>";
echo "<table align='center' border='0' width='90%' cellpadding='1' cellspacing='1'>";
echo "<tr>";
echo "<td bgcolor='#ff00ff' width='85%'>$kommentar1</td>";
echo "<td bgcolor='#008000' width='*'> </td>";
echo "</tr>";
echo "</table>";
echo "<br>\n";
// HIER NE ÄNDERUNG
$eintrag_nr++;
}