Seaholme Posted August 10, 2010 Share Posted August 10, 2010 Hey, I've created a messaging system for my site and I'm trying to make it so that a copy of the original message is included and automatically put into the message content box when somebody clicks to reply. I've done this literally just by making the "reply" button into a form which also posts the content of the message from the previous page and puts it into the content box. However I have some issues with it: firstly, wherever ' is used, it becomes \' and wherever " is used, the whole of the rest of the message is blanked out. Can anybody point me in the direction of the solutions I might need to make it so that ' and " both appear normally without cutting the rest of the message off? Thanks in advance & let me know if anything is missing! Quote Link to comment https://forums.phpfreaks.com/topic/210322-allowing-and-marks/ Share on other sites More sharing options...
onlyican Posted August 10, 2010 Share Posted August 10, 2010 Adding a ' will make it a \' as its escaping the quote for DB Protection (or your query would fall over) When you echo out the code, just use stripslashes(); so echo stripslashes($str); Quote Link to comment https://forums.phpfreaks.com/topic/210322-allowing-and-marks/#findComment-1097544 Share on other sites More sharing options...
Seaholme Posted August 10, 2010 Author Share Posted August 10, 2010 Thanks! That has solved the ' --> \' bit. However I still have the problem that " cuts off the rest of my message :[ Quote Link to comment https://forums.phpfreaks.com/topic/210322-allowing-and-marks/#findComment-1097573 Share on other sites More sharing options...
wildteen88 Posted August 10, 2010 Share Posted August 10, 2010 However I still have the problem that " cuts off the rest of my message :[ Post the code that outputs the message. It sounds like you'll need to use htmlentities with the ENT_QUOTES flag when displaying the messages Quote Link to comment https://forums.phpfreaks.com/topic/210322-allowing-and-marks/#findComment-1097687 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.