dadamssg Posted July 16, 2009 Share Posted July 16, 2009 Im trying to figure out whats goin on here. i store events that can be updated in my db. So, the title,location,times, etc can be updated. For the update form, i have a form that has the default text or 'value's of whats already in the db. So if the title of the event was Party Tonight. A stripslashes version of it would show up in the title field of the form as the default value. But when i have a title with quotation marks in it (") the quotations and everything in between doesn't show up. I'm wondering if i'm stripslashing it more than once and if that could be the cause of the disappearing text?? anybody know? Link to comment https://forums.phpfreaks.com/topic/166211-solved-stripslashes-twice/ Share on other sites More sharing options...
p2grace Posted July 16, 2009 Share Posted July 16, 2009 It doesn't appear because of the <input type="text" value="valuewith"" /> (notice the double quotes). One method would be to use str_replace() to replace aprostrophe's and leave the escaped quotations. There's probably a better way to do it but that's the first idea that popped in my head. Link to comment https://forums.phpfreaks.com/topic/166211-solved-stripslashes-twice/#findComment-876476 Share on other sites More sharing options...
Bendude14 Posted July 16, 2009 Share Posted July 16, 2009 if you are trying to display a string with quotes in use htmlentities(); Link to comment https://forums.phpfreaks.com/topic/166211-solved-stripslashes-twice/#findComment-876481 Share on other sites More sharing options...
dadamssg Posted July 16, 2009 Author Share Posted July 16, 2009 i completely forgot about the " being used in the input tags. Htmlentities did the trick, thanks! Link to comment https://forums.phpfreaks.com/topic/166211-solved-stripslashes-twice/#findComment-876491 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.