Smilies in guestbook

[SIZE=1]Hi guys and girls…

I have this guestbook at my friend’s site and it works ok. It uses php&mysql… [phpMyAdmin]…
[/SIZE][SIZE=1][COLOR=DarkGreen]but I can’t figure out for example if “smiley” will be written by a user that it will be replaced with a smiley.jpg…[/COLOR][/SIZE][SIZE=1]

Just for a showcase here’s a script to load my entries…

[SIZE=2]_parent.read.entries.text = "Loading entries... Please wait...";
// Begin Loading
myEntries = new LoadVars()
myEntries.ref = this
    myEntries.load("GuestBook.php?action=read&r="+random(999)+"&NumLow="+_parent.NumLow) 
    myEntries.onLoad = function(success){ 
        if(success){ 
            // Assign output to components and objects
            entries.html = true;
            entries.htmlText = this.entries;
            totalEntries.text = this.totalEntries;
    } 
}
// Load Default
_parent.read.loadEntries("Default", 10);
stop();[/SIZE]

[/SIZE]