linie skift i php?
hvordan får jeg lavet liniskift i denne her tagwall.prøv engang linket og se hvad jeg mener.
Jeg har koden neden under.
http://www.whitehat.dk/skadam/tagwall/tagwall.php
---------------------------------------------
<?#!/usr/bin/php
if($HTTP_POST_VARS){
foreach($HTTP_POST_VARS as $Key=>$Value)
{
$$Key = $Value;
}
}
if($HTTP_GET_VARS){
foreach($HTTP_GET_VARS as $Key=>$Value)
{
$$Key = $Value;
}
}
$allow_html = 0;
if($farve && $navn && $tag && $hjem && $email)
{
$tag = ereg_replace(\"<\",\"<\",$tag);
$tag = ereg_replace(\">\",\">\",$tag);
$fil = \"tagwall.txt\";
$mam = time() - 200;
$tid = date(\"G:i:s\",$mam);
$str = \"
<hr>
<td valign=\\\"top\\\">
<font color=\\\"FBCD32\\\">
Tid: $tid
</font>
</td>
<P>
<td valign=\\\"top\\\" nowrap>
<font color=\\\"FBCD32\\\">
Navn: $navn
</font>
</td>
</P>
<P>
<td valign=\\\"top\\\" nowrap>
<font color=\\\"FBCD32\\\">
E-mail:<a href=\\\"mailto:$email\\\"> $email</a>
</font>
</td>
</P>
<p>
<td valign=\\\"top\\\">
<font color=\\\"FBCD32\\\">
Hjemmeside:<a href=\\\"http://\\\"> $hjem</a>
</font>
</td>
</P>
<P>
<td>
<font color=\\\"FBCD32\\\">
kommentar:
</font>
</td>
<td width=\\\"\\\" height=\\\"\\\" nowrap>
<font color=\\\"$farve\\\" valign=\\\"top\\\">
$tag
</font>
<hr>
</td>
\\n\";
$fp = fopen($fil, r);
if($fp) {
$filArray = file($fil);
$result = implode(\"\", $filArray);
$result = \"$str$result\";
fclose($fp);
}
$fp = fopen($fil, w);
if($fp) {
fputs($fp, $result);
fclose($fp);
}
header(\"location: tagwall.php\");
}
?>
<html>
<head>
<title>---Gæstebog---</title>
</head>
<body bgcolor=\"Black\">
<form action=\"tagwall.php\" method=\"post\">
<font color=\"FBCD32\">
<pre>
Vælg farve: <select name=\"farve\">
<option value=\"FBCD32\">DarkYellow</option>
<option value=\"red\">Rød</option>
<option value=\"blue\">Blå</option>
<option value=\"green\">Grøn</option>
</select>
Navn: <input type=\"text\" name=\"navn\" maxlength=\"50\">
E-mail: <input type=\"text\" name=\"email\" maxlength=\"50\">
Hejmmeside: <input type=\"text\" name=\"hjem\" value=\"http://www.\" maxlength=\"100\">
Kommentar:
<TEXTAREA rows=5 type=\"text\" name=\"tag\" cols=40></TEXTAREA>
<input type=\"submit\" name=\"skriv\" value=\"Post\">
</pre>
</font>
</form>
<?readfile(\"tagwall.txt\");?>
</body>
</html>