Jump to content

PHP Guestbook Smiley/Edit Question


sanleless

Recommended Posts

I am setting up a PHP guestbook. I have also set up a script to use smilies. It uses a text file to store messages. In the stored message the smilies are saved as code, IE -

<img src="image/smile/tongue.gif">

When I edit a message with smilies in it, the text part comes up in the edit box but not the smiley code so that you have to reinsert smilies into a message. Any idea how to remedy this? ThanksĀ  :)

Link to comment
https://forums.phpfreaks.com/topic/66218-php-guestbook-smileyedit-question/
Share on other sites

looks like you are replacing the smilie code ( eg: :P) when you save the submitted text into the text file, or however you store it. What you should do is process the smilie code when you go to display the data stored on your page instead. That way when you go to edit the text later on it'll still be in its rawest form (no fomatting, basic text).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.