you can store the smilies as jpegs or gifs and so str_replace to change the input
to
Code:
<img src=\"images\happy.gif\" alt=\":)\" />
using something like:
Code:
$row["message"] = str_replace(":angry:", "<img alt=\"angry.gif\" src=\"emoticons/angry.gif\" />", $row["message"]);
just before the message is posted to the database: this one clearly assumes the line to be put into the guestbook is called $row
Bookmarks