gæstebog
når jeg skal til at skrive i min gæstebog vil jeg gerne have at datoen kommer på den side jeg viser gæstebogen i, hvordan gør jeg det?? ligesom her i experten.skriv.php:
<?php include("../config.php"); ?>
<? if (count($HTTP_POST_VARS)) {
mysql_query("insert into bog (navn, besked, email, emne, dato) values('$HTTP_POST_VARS[navn]', '$HTTP_POST_VARS[besked]', '$HTTP_POST_VARS[email]', '$HTTP_POST_VARS[emne]', '$HTTP_POST_VARS[dato]')") or die(mysql_error()); ?>
<a href="se.php"> Se Gæstebog </a><? } else { ?>
<br>
<form name="form" method="post">
<table width="430" border="0" cellpadding="2" cellspacing="0">
<tr>
<td> </td>
<td> </td>
<td align="left">Velkommen til denne side </td>
<td> </td>
</tr>
<tr>
<td width="2"> </td>
<td> </td>
<td> </td>
<td width="2"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td align="left">Skriv i gæstebogen</td>
<td> </td>
</tr>
<tr>
<td width="2"> </td>
<td valign="top">Navn</td>
<td valign="top"><input name="navn" type="text" size="40"></td>
<td width="2"> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Email:</td>
<td><input name="email" type="text" size="40"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>Emne:</td>
<td><input name="emne" type="text" id="emne" size="40"></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="2"> </td>
<td valign="top">Besked</td>
<td valign="top"><textarea name="besked" cols="55" rows="7" wrap="VIRTUAL"></textarea></td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td> </td>
<td> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td> </td>
<td><input name="submit" type="submit" value="Send"></td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td> </td>
<td> </td>
<td width="2"> </td>
</tr>
</table>
</form>
<? } ?>
se.php:
<?php include("../config.php"); ?>
<?
$sql = mysql_query("select * from bog");
while($row=mysql_fetch_array($sql))
{
?>
<table width="430" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="2"> </td>
<td colspan="2" rowspan="7" align="center"><table class="border_t" width="430" border="0" cellspacing="0" cellpadding="2">
<tr>
<td colspan="2" align="left" bgcolor="#CCCCCC" class="H1 border_q"><?=$row["emne"]?></td>
</tr>
<tr>
<td width="150" align="left" valign="top" class="tabelen">
Skrevet af: <br>
<?=$row["navn"]?>
<br>
<br>
Mail:<br>
<?=$row["email"]?>
</td>
<td width="250" align="left" valign="top" class="border_inde"><?=$row["besked"]?></td>
</tr>
<tr>
<td width="150"> </td>
<td width="250" class="border_inde"> </td>
</tr>
</table>
<span class="border_inde border_q">
</span></td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
<tr>
<td width="2"> </td>
<td width="2"> </td>
</tr>
</table>
<? } ?>