Jump to content

Confuscious He say: Excuse me...


rwwd

Recommended Posts

Can someone confirm for me this: All data in $_GET || $_POST is technically a string; I know this to be true DEFINITELY for $_POST array, but I'm not too sure on $_GET and I cannot find a reference to this on the manual, so I am assuming that I should treat it exactly the same as $_POST; the thing I do know is that $_GET is automatically sent through urlencode() hence, if you apply urlencode() to the $_GET array() you will get some unexpected results.

 

Just to note, this is for information only, something I have always assumed/presumed true, so I thought I would ask some black belt php 'grammers.

 

Hmm, if I had a beard I would be stroking it in a stance of deep thought right now...

 

Rw

Link to comment
Share on other sites

PHP will put arrays in $_POST as well, such as in this thread: http://www.phpfreaks.com/forums/index.php/topic,310848.0.html

 

But if it's not an array then yes, i'ts a string.  That's the same for $_GET and $_POST.  PHP will urldecode() $_GET data automatically for you, so it arrives ready to use.  Did you mean urldecode() or urlencode()?

Link to comment
Share on other sites

Did you mean urldecode() or urlencode()?

 

Um, yes, typo, the former not the latter. Thanks for the explanation, I always wonder, but I treat $_GET just like $_POST, I would rather be safe than sorry, and so far, no problems, I did have a piece of wood here somewhere too..

 

Rw

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.