Zitat (Holger_N: 10.06.2011, 21:42)
Stimmt vielleicht in deinem restlichen Dokument die Zeichensatzkodierung nicht?
ka.
CODE
<div class="content">
<h2>Gästebuch - neuer Beitrag</h2>
<hr size="6" color="#CCCCCC" />
<br />
<div class="gaestebuch">
<?php
$user = $_POST["name"];
/*$user = htmlentities($user);*/
$user = str_replace ("ü", "ü", $user);
$user = str_replace ("Ü", "Ü", $user);
$user = str_replace ("ö", "ö", $user);
$user = str_replace ("Ö", "Ö", $user);
$user = str_replace ("ä", "ä", $user);
$user = str_replace ("Ã\"", "Ä", $user);
$user = str_replace ("ß", "ß", $user);
$inhalt = $_POST["inhalt"];
/*$inhalt = htmlentities($inhalt);*/
$inhalt = str_replace ("ü", "ü", $inhalt);
$inhalt = str_replace ("Ü", "Ü", $inhalt);
$inhalt = str_replace ("ö", "ö", $inhalt);
$inhalt = str_replace ("Ö", "Ö", $inhalt);
$inhalt = str_replace ("ä", "ä", $inhalt);
$inhalt = str_replace ("Ã\"", "Ä", $inhalt);
$inhalt = str_replace ("ß", "ß", $inhalt);
$inhalt = str_replace("\n", "<br>", $inhalt);
$datum= date("d.m.Y H:i");
$eintrag="|$user|$datum|$inhalt";
$datei = fopen("gaestebuch.txt", "a");
fwrite($datei, "\n".$eintrag);
fclose($datei);
echo 'Ihr Eintrag wurde erfolgreich gespeichert.';
?>
<br />
<br />
<a href="gaestebuch.php">Zurück zum Gästebuch</a>
</div>
<br />
<hr size="6" color="#CCCCCC" />
<h2>Gästebucheinträge:</h2>
<div class="gaestebuch">
<?php
$beitrag = file("gaestebuch.txt");
krsort($beitrag);
foreach($beitrag as $ausgabe)
{
$ausgabe = stripslashes($ausgabe);
$zerlegen = explode("|", $ausgabe);
echo "
<table class=\"form\" align=\"center\" cellspacing=\"0\" cellpadding=\"5\" width=\"75%\">
<tr>
<td>
Von <b>$zerlegen[1]</b>
am $zerlegen[2]Uhr:
</td>
</tr>
<tr>
<td>
$zerlegen[3]
</td>
</tr>
</table><br>
";
}
?>
</div>
<!-- end .content --></div>
<h2>Gästebuch - neuer Beitrag</h2>
<hr size="6" color="#CCCCCC" />
<br />
<div class="gaestebuch">
<?php
$user = $_POST["name"];
/*$user = htmlentities($user);*/
$user = str_replace ("ü", "ü", $user);
$user = str_replace ("Ü", "Ü", $user);
$user = str_replace ("ö", "ö", $user);
$user = str_replace ("Ö", "Ö", $user);
$user = str_replace ("ä", "ä", $user);
$user = str_replace ("Ã\"", "Ä", $user);
$user = str_replace ("ß", "ß", $user);
$inhalt = $_POST["inhalt"];
/*$inhalt = htmlentities($inhalt);*/
$inhalt = str_replace ("ü", "ü", $inhalt);
$inhalt = str_replace ("Ü", "Ü", $inhalt);
$inhalt = str_replace ("ö", "ö", $inhalt);
$inhalt = str_replace ("Ö", "Ö", $inhalt);
$inhalt = str_replace ("ä", "ä", $inhalt);
$inhalt = str_replace ("Ã\"", "Ä", $inhalt);
$inhalt = str_replace ("ß", "ß", $inhalt);
$inhalt = str_replace("\n", "<br>", $inhalt);
$datum= date("d.m.Y H:i");
$eintrag="|$user|$datum|$inhalt";
$datei = fopen("gaestebuch.txt", "a");
fwrite($datei, "\n".$eintrag);
fclose($datei);
echo 'Ihr Eintrag wurde erfolgreich gespeichert.';
?>
<br />
<br />
<a href="gaestebuch.php">Zurück zum Gästebuch</a>
</div>
<br />
<hr size="6" color="#CCCCCC" />
<h2>Gästebucheinträge:</h2>
<div class="gaestebuch">
<?php
$beitrag = file("gaestebuch.txt");
krsort($beitrag);
foreach($beitrag as $ausgabe)
{
$ausgabe = stripslashes($ausgabe);
$zerlegen = explode("|", $ausgabe);
echo "
<table class=\"form\" align=\"center\" cellspacing=\"0\" cellpadding=\"5\" width=\"75%\">
<tr>
<td>
Von <b>$zerlegen[1]</b>
am $zerlegen[2]Uhr:
</td>
</tr>
<tr>
<td>
$zerlegen[3]
</td>
</tr>
</table><br>
";
}
?>
</div>
<!-- end .content --></div>

Hilfe
Neues Thema
Antworten


Nach oben


