atlanta Posted December 26, 2006 Share Posted December 26, 2006 Hi everyone i was coding last night and made a page where users can submit css code into a post form and then it outputs them to a page where there code is inserted into a form where they can post on there site so that users can just click and preview the layout they submitted only thing is and i know this is simple but im new to the php thing is that when they submit it php put \ in front of all the " and ' what do i need to use to make it not apply the \ before these characters?? Thanks Much.from:<style type=\"text/css\">to <style type="text/css"> Link to comment https://forums.phpfreaks.com/topic/31881-need-help-on-coding/ Share on other sites More sharing options...
ToonMariner Posted December 26, 2006 Share Posted December 26, 2006 use stripslashes($string) where $string is the info you are outpuuting to the screen. Link to comment https://forums.phpfreaks.com/topic/31881-need-help-on-coding/#findComment-147939 Share on other sites More sharing options...
tomfmason Posted December 26, 2006 Share Posted December 26, 2006 or..It would seem to me that you have get_magic_quotes_gpc turned on.. If so place something like this at the top of your script.[code=php:0]if (get_magic_quotes_gpc()) { $_POST = array_map('stripslashes', $_POST);}[/code]that should fix the issue.. Good Luck,Tom Link to comment https://forums.phpfreaks.com/topic/31881-need-help-on-coding/#findComment-147942 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.