Jump to content
Larry Ullman's Book Forums

Recommended Posts



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 post
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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...