Hi,
I have a [Message Board] on my website, everything works fine but now I want to update it. I wanted to add the [smilies] like on this site.
So if I click on a smilie on my site, the shortcut will be added the the text <textarea name="content"></textarea> like this -> :-D
But from here on I have a problem! If now I click on "submit" the smilie will be added as "text"! That's normal, since I don't know how I have to tell php & mysql to add it as <html> ->
<img width="19" height="19" src="$smiliename">
I also added this to my submit code (saving in database)
$msg=addslashes($content);
So If a user uses this " php will add the slash infrot of, since I work with <HTML> code in the database.
So how can I say in php:
IF ":-D" than "<img width="19" height="19" src="/url/teeth_smile.gif">"
I have about 40 smilies. But the *.gif file name is not called as the shotcut! (":-D" == "teeth_smile.gif")