Suppose a user enters something and it is stored as a string. Run the php function str_replace on that string before posting. Each time you find the sequence :) then replace it with
Here is some more info: http://us2.php.net/str-replace
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
Create a table with all of the different icons as images. Use javascript (sorry, I don't know the language enough to provide sample code, but it shouldn't be difficult at all) so that when an image is clicked on, it adds the text equivalent of the smilie to the textbox. When the user clicks submit, the php file will run the str_replace function and make it into an image.
cscgal
The Queen of DaniWeb
19,421 posts since Feb 2002
Reputation Points: 1,474
Solved Threads: 229
<?php
echo str_replace(":)", "47.gif", "<img src=\":)\">");
?>
dean8710
Junior Poster in Training
54 posts since Jul 2011
Reputation Points: 7
Solved Threads: 2