Witam , jestem nowy i mam maly problem... jak zrobic aby w tej ksiedze gosci mozna bylo wstawiac emoty (czy jak to sie pisze ;p) ?
[php:1:2761cc1bc4]<?php
$txt=fopen("guestbook.gb","r");
$gbfile="";
while($line=fgets($txt,3000))
$gbfile.=$line;
//name
if(isset($name))
if($name==""){
$errorfarbe_1 = "red";
$error = "fehler";
}
else{
$errorfarbe_1 = "black";
}
//comment
if(isset($comment))
if($comment==""){
$errorfarbe_2 = "red";
$error = "fehler";
}
else{
$errorfarbe_2 = "black";
}
if(!$aktion){
$aktion = "eingabe";
}
if($error=="fehler"||$aktion=="eingabe"){
?>
<p align="center"><strong>Spis </strong></p>
<form method="post" action="<? echo $PHP_SELF;?>">
<div align="left"><strong>Nick</strong><br />
<input type="text" name="name" size="30" <? if(isset($name)) echo
"value='$name'";?> class="eingabe">
<br />
<strong>Mail</strong><br />
<input type="text" name="mail" size="30" class="eingabe">
<br />
<strong>Linkstrong><br />
<input type="text" name="site" size="100" value="http://" class="eingabe">
<br />
<font color="#FFCCCC"><br>
</font><strong>Wpisz:</strong>:<br />
<textarea name="comment" cols="100" rows="10" class="eingabe"><?
if(isset($comment)) echo "$comment";?></textarea>
<br />
<br />
<input type="submit" name="Button" value="Wyslij" class="eingabe">
<input type="Hidden" name="aktion" value="senden" class="eingabe">
<br>
</div>
</form>
<p align="center"><strong>Wpisy:</strong></p>
<p> </p>
<?
echo "<p>$gbfile</p>"
?>
<? }else{
if(isset($name)&&isset($comment)&&isset($mail)&&isset($site))
{
$name=stripslashes(strip_tags($name));
$comment=stripslashes(strip_tags($comment));
$mail=stripslashes(strip_tags($mail));
$site=stripslashes(strip_tags($site));
$gbfile="<b>$name</b> - ".date("m/d/Y")."<br>n<a
href='mailto:$mail'>$mail</a>n"."<br>n<a href='$site'
target='blank'>$site</a>n"."<br>n $comment <br><br>n".$gbfile;
fclose($txt);
$txt=fopen("guestbook.gb","w");
fputs($txt,$gbfile);
}
echo "<p><a href='wpisy.php'>Wpisy</a><br><br> " . $gbfile . "</p>";
fclose($txt);
}
?>[/php:1:2761cc1bc4]