zrobiłem troche inaczej
dodawacz.php
<style type="text/css">
<!--
body {
background-color: #000000;
}
.style2 {
color: #FF0000;
font-weight: bold;
font-size: 18px;
}
#Layer1 {
position:absolute;
left:204px;
top:69px;
width:81px;
height:22px;
z-index:1;
}
#Layer2 {
position:absolute;
left:98px;
top:54px;
width:82px;
height:20px;
z-index:2;
}
.style3 {
color: #FF0000;
font-weight: bold;
}
-->
</style>
<script type="text/javascript">
function emoticon(text) {
text = ' ' + text + ' ';
if (document.post.tresc.createTextRange && document.post.tresc.caretPos) {
var caretPos = document.post.tresc.caretPos;
caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
document.post.tresc.focus();
} else {
document.post.tresc.value += text;
document.post.tresc.focus();
}
}
</script>
<a href="javascript:emoticon('<serduszka>')"><img src="emoty/serduszka.gif" alt="Mr. Green" width="23" height="16" border="0" title="Mr. Green" /></a>
<a href="javascript:emoticon('<sciana>')"><img src="emoty/sciana.gif" width="30" height="15" border="0" /></a>
<a href="javascript:emoticon('<boks>')"><img src="emoty/boks.gif" width="37" height="15" border="0" /></a>
<form action="zapis.php" name="post" method="POST">
<table width="100%">
<tr>
<td width="1%"><div align="center"></div></td>
<td width="99%">
<div align="center"><span class="style2">Autor</span>
<span class="style2">
<input name="autor" type="text" autocomplete="on" value="" size="38" />
</span></input>
</div></td></tr>
<tr>
<td width="1%"><div align="center"></div></td>
<td width="99%">
<div align="center">
<span class="style2">
Treść</span>
<textarea name="tresc" cols="20" style="width: 252; height: 70;" autocomplete="off"></textarea>
</div></td>
</tr>
<tr>
<td > </td>
<td>
<div align="center">
<input type="submit" value="Dodaj" />
</div></td></tr>
</table>
<div align="center"><span class="style3">Komentarze sa własnoscia ich autorów. <br />
Autor strony nie ponosi odpowiedzialności za ich tresć!</span>
</div>
</form>
<table class="all" border="0" width="100%">
<tr>
<td><?php include "wiadomosc.php"; ?></td>
</tr>
</table>
<meta http-equiv="Pragma" content="no-cache" />
<div align="center"></div>
I wszystko gra tylko że jak zapisze wiadomość z emotką to nie wyświetla emotki dlaczego?