hallo bin anfänger und habe da ein problem
möchte ein kleines gästebuch programieren wie bekomme ich das datum des eintrages in die ausgabe seite ????
z.b. so : Freitag, 21 Januar 2005 um 18:09 Uhr
wer sich den salat mal anschauen möchte :
http://www.nolimits-hh.de/php/ausgabe.php
und für die eingabe :
http://www.nolimits-hh.de/php/eingabe.php
/danke für eure hilfe :-)
QUELLTEXT FÜR DIE eingabe.php:
<?php
$now = time();
if (isset ($gesendet))
{
mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("xxxxx");
$sqlab = "insert board";
$sqlab .= "(email, datum, nachricht) values ";
$sqlab .= "('$em' , '$now' , '$na')";
mysql_query($sqlab);
}
QUELLTEXT FÜR DIE ausgabe.php:
<?php
mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("xxxxx");
$res = mysql_query("select * from board");
$num = mysql_num_rows($res);
while ($dsatz = mysql_fetch_assoc($res))
{
echo "<tr>";
echo " <td>" . $dsatz["datum"] . "</td>";
echo "</tr>";
}
möchte ein kleines gästebuch programieren wie bekomme ich das datum des eintrages in die ausgabe seite ????
z.b. so : Freitag, 21 Januar 2005 um 18:09 Uhr
wer sich den salat mal anschauen möchte :
http://www.nolimits-hh.de/php/ausgabe.php
und für die eingabe :
http://www.nolimits-hh.de/php/eingabe.php
/danke für eure hilfe :-)
QUELLTEXT FÜR DIE eingabe.php:
<?php
$now = time();
if (isset ($gesendet))
{
mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("xxxxx");
$sqlab = "insert board";
$sqlab .= "(email, datum, nachricht) values ";
$sqlab .= "('$em' , '$now' , '$na')";
mysql_query($sqlab);
}
QUELLTEXT FÜR DIE ausgabe.php:
<?php
mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("xxxxx");
$res = mysql_query("select * from board");
$num = mysql_num_rows($res);
while ($dsatz = mysql_fetch_assoc($res))
{
echo "<tr>";
echo " <td>" . $dsatz["datum"] . "</td>";
echo "</tr>";
}
Kommentar