homepage Welcome to WebmasterWorld Guest from 54.226.136.179
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Submitting data in a form
Is there a way to decode data usbmitted in form
zootreeves

10+ Year Member



 
Msg#: 9588 posted 8:59 am on Aug 10, 2005 (gmt 0)

I am trying to create an online admin section where html can be edited on my site but whenever there is a ' or " or \ the submitted data comes out as \' or \" or \\...

for example
[codes]<form action=test.php method=post>
<textarea><table><td width='400'>"hello"</td></table></textarea>[/codes]

comes out as:
<table><td width=\'400\'>\"hello\"</td></table>

Is there any way to decode this? I have tried urldecode() and htmlspecialchars() but they don't work...

Thanks
Ben

 

mcibor

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 9588 posted 9:18 am on Aug 10, 2005 (gmt 0)

The addition means that you have addslashes on. To get rid of the \ simply

$no_slashes = stripslashes($variable);

Best regards
Michal Cibor

zootreeves

10+ Year Member



 
Msg#: 9588 posted 9:24 am on Aug 10, 2005 (gmt 0)

worked like a charm thanks for the quick reply

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved