homepage Welcome to WebmasterWorld Guest from 54.147.196.159
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
escaping get request in php
Lisa

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 439 posted 11:37 pm on Jun 29, 2002 (gmt 0)

I am looking to send some information with the Get request but when I read the variable in PHP it is all encoded. I have been trying to locate the function that uncodes this. Anyone know this off the top of their head?

Thanks!

 

rewboss

10+ Year Member



 
Msg#: 439 posted 2:24 pm on Jun 30, 2002 (gmt 0)

rawurldecode() and urldecode()

The difference (as far as I can see) is that if spaces have been encoded as +, you will need urldecode().

rawurldecode("foo%20bar") == "foo bar"
urldecode("foo+bar") == "foo bar"

If in doubt, urldecode() is probably the one to use.

To encode URLs, of course, use rawurlencode() or urlencode() as appropriate.

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