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"> Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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.