Professional Web Applications Themes

am I dreaming? _get variables decode wrong - PHP Development

I have a string that I $_get['name]' from the query string lets say that it is "The Hallie's" The entire Query string looks like this: $_SERVER['QUERY_STRING'] == op=The%20Hailie%27s (I edited out other params) The " ' " is escaped which is a reasonable thing I would think. When I access The $_get['op'] returns as "The Hailie\'s " I am encoding the string using either urlencode or rawurlencode before sending, it doesn't seem to matter. The problem is that the PHP pr appears to decode the get strings when it ps by variable - which is a lovely thing, but gets ...

  1. #1

    Default am I dreaming? _get variables decode wrong

    I have a string that I $_get['name]' from the query string

    lets say that it is "The Hallie's"

    The entire Query string looks like this:


    $_SERVER['QUERY_STRING'] == op=The%20Hailie%27s (I edited out other
    params)

    The " ' " is escaped which is a reasonable thing I would think.

    When I access The $_get['op'] returns as "The Hailie\'s "

    I am encoding the string using either urlencode or rawurlencode before
    sending, it doesn't seem to matter.

    The problem is that the PHP pr appears to decode the get strings when
    it ps by variable - which is a lovely thing, but gets confused by the
    " ' " character.

    I know I can clean this up in code, but this strikes me as very strange
    behavior. Am I missing something or is this a bug?
    Daniel Doman Guest

  2. #2

    Default Re: am I dreaming? _get variables decode wrong

    Jason Dumler <dumlerjason_bugger_spamnetscape.net> wrote in
    news:EIRMa.563223$vU3.115441news1.central.cox.net :

    Yeah - serves me right for trying to figure it out at 3am. I read a bit
    more in the morning and learned about magic gpc. I don't want to count on
    changes in the php.ini so I just test for it in my code.. Sigh...
    Daniel Doman Guest

Similar Threads

  1. #39011 [NEW]: foreach($_GET as $key => &$value) causes later bugs passing $_GET as a paramete
    By php_bug dot email at email dot digiways dot com in forum PHP Bugs
    Replies: 14
    Last Post: October 2nd, 10:32 AM
  2. Accepting variables via $_GET and $_POST in same script ?
    By Zurab Davitiani in forum PHP Development
    Replies: 0
    Last Post: July 21st, 08:15 PM
  3. Variables from ASP, what am I doing wrong?
    By Andy Petroski in forum Macromedia Flash Actionscript
    Replies: 3
    Last Post: February 29th, 11:19 PM
  4. HTTP_POST_VARS include wrong variables
    By S.Shaigany in forum PHP Development
    Replies: 1
    Last Post: September 26th, 09:39 PM
  5. #24564 [NEW]: The global variables $_GET, $_REQUEST, $_POST have content errors.
    By php-bug at leolabs dot com in forum PHP Development
    Replies: 0
    Last Post: July 9th, 03:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139