On Sat, 18 Oct 2003 19:08:14 +0200, "Nederbasse"
<laneSPAMFRI@jubiipost.dk> wrote:
>Jeg har hele side her
www.neder.dk/bytte.htm
>
>Lars
Ja, det giver problemer, da du har <HEAD></HEAD> før header. Desuden
var der en lille fejl i: $fp = fopen($fil, w); skal være: $fp =
fopen($fil, 'w');
Prøv med:
<?php
if(isset($_POST['navn']) && isset($_POST['besked']))
{
$besked = ereg_replace("<","<",$besked);
$besekd = ereg_replace(">",">",$besked);
$fil = "gbog.txt";
$tid = date("d M Y");
$str = "<table>
<tr><td colspan=\"2\"><hr size=\"1\"></td></tr>\n
<tr><td>Tid:</td><td>$tid</td></tr>\n</tr>\n
<tr><td>Navn:</td><td>$navn</td></tr>\n
<tr><td>Email:</td><td><a
href=\"mailto:$email\">$email</a></td></tr>\n
<tr><td>Telefon:</td><td>$tlf</td></tr>\n
<tr><td>Type:</td><td>$type</td></tr>\n
<tr><td colspan=\"2\"><br>$besked</td></tr>\n";
if(file_exists($fil))
{
$filArray = file($fil);
$result = implode("", $filArray);
$str .= $result;
}
$fp = fopen($fil, 'w');
if($fp)
{
fputs($fp, $str);
fclose($fp);
}
header("location: bytte.php");
}
?>
<html>
<head>
<title>Intranet - Bestillinger mm.</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="../intra.css">
</head>
<body bgcolor="#FFFFFF" leftmargin="10">
</table>
<br>
<table width="100%" border="0" cellspacing="20">
<tr>
<td background="../images/stalbg.jpg" width="20%" valign="top">
<p> </p>
</td>
<td width="67%" valign="top">
<div align="center">
<center>
<p> </p>
<table border="0" cellpadding="0" cellspacing="0" width="95%"
height="100%" bgcolor="#FFFFFF">
<tr>
<td width="100%" align="center"> <h3>Byttebixen</h3>
</center>
<form action="bytte.php" method="post">
<table border="0" align="center">
<tr><th>
<p align="right">Navn: </p>
</th><td><input type="text" name="navn"> (skal udfyldes)</td></tr>
<tr><th>
<p align="right">Email: </p>
</th><td><input type="text" name="email"></td></tr>
<tr><th>
<p align="right">Telefon: </p>
</th><td><input type="text" name="tlf"></td></tr>
<tr><th>
<p align="right">Køb - salg - bytte: </p>
</th><td><input type="text" name="type"></td></tr>
<tr><td valign="top">
<p align="right"><b>Annonce - tekst: </b><br>(skal
udfyldes) </p>
</td><td colspan="2"><textarea name="besked" cols="30"
rows="8"></textarea></td></tr>
<tr><td colspan="2" align="center"><input type="submit" name="Send"
value="Send">
<input type="reset" value="Nulstil" name="reset"></td></tr>
</table>
</form> </td>
</tr>
</table>
<p> </p>
</div>
</td>
</tr>
</table>
</body>
</html>
--
Med Venlig Hilsen
c",) Martin S