Jump to content
Larry Ullman's Book Forums

P.105, Encoding And Decoding Strings


Recommended Posts

Hello,

 

I'm very happy to know about the urlencode and urldecode functions on p.105, but I got a little bit confused regarding the tip there. It says:

 

"Values sent directly from a form are automatically URL-encoded prior to being sent and decoded upon arrival at the receiving script. Y ou only need the urlencode() function to manually encode data (as in the example)."

 

So, why do I need to manually encode the data while values sent from a form are actually URLencoded automatically?

 

Sorry for this dumb question but I have been thinking about this for half an hour, sorry...

Though, this is the best book for beginning php learners like me. :D

 

 

Link to comment
Share on other sites

Thanks for the nice words on the book. Basically, the browser automatically and smartly handles the encoding and decoding of form data. But data in the URL is not automatically handled by the browser, so you have to.

Link to comment
Share on other sites

 Share

×
×
  • Create New...