Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > php form - urldecode & ' " characters

php form - urldecode & ' " characters
Thread Tools
Grizzled Veteran
Join Date: May 2005
Location: Toronto, ON
Status: Offline
Reply With Quote
Nov 23, 2005, 10:26 AM
 
I'm trying to get urldecode to work on a php form I made.

the code I am using to decode the data from the original form is:

$blah = nl2br(urldecode($_POST["blah"]));

the urldecode part takes care of special characters showing up properly, so that for the most part works. and nl2br takes care of whitespace and crriage returns.

the problem I'm having is it doesn't properly decode the ' and " signs. instead of displaying ' or " as it should, it instead leads it with a \, like this: \' or \"

anyone know how I can fix this?
MacBook Pro | 2.16 ghz core2duo | 2gb ram | superdrive | airport extreme
iBook G4 | 1.2ghz | 768mb ram | combodrive | airport extreme
iPhone 3GS | 32 GB | Jailbreak, or no Jailbreak
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Nov 23, 2005, 10:33 AM
 
Check out ereg_replace
     
mpancha  (op)
Grizzled Veteran
Join Date: May 2005
Location: Toronto, ON
Status: Offline
Reply With Quote
Nov 23, 2005, 12:28 PM
 
tried ereg_repplace, but it didn't work.

ended up using stripslashes

thanks though.
MacBook Pro | 2.16 ghz core2duo | 2gb ram | superdrive | airport extreme
iBook G4 | 1.2ghz | 768mb ram | combodrive | airport extreme
iPhone 3GS | 32 GB | Jailbreak, or no Jailbreak
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 07:44 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2