Dot in POST parameter name gets converted to "_"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy

    Dot in POST parameter name gets converted to "_"

    I've noticed that a dot in a POST parameter name - i.e.

    <input name="person.fi rst_name" type="text">

    get converted to an underscore when populated into $_POST. Presumably
    this is a throwback to register_global s, as the programmer would not be
    able to access the variables unless the dots were stripped (since dots
    are concatenation in PHP). However, since register_global s is pretty
    much never used, I thought there might be a way to turn this off via
    php.ini.

    Prepending code to re-parse the postdata would solve the problem, but it
    seems lame to parse the postdata twice.

    Thanks,
    Jeremy
  • Andy Hassall

    #2
    Re: Dot in POST parameter name gets converted to &quot;_&quot ;

    On Sun, 03 Jun 2007 15:34:07 -0700, Jeremy <jeremy@pinacol .comwrote:
    >I've noticed that a dot in a POST parameter name - i.e.
    >
    ><input name="person.fi rst_name" type="text">
    >
    >get converted to an underscore when populated into $_POST. Presumably
    >this is a throwback to register_global s, as the programmer would not be
    >able to access the variables unless the dots were stripped (since dots
    >are concatenation in PHP). However, since register_global s is pretty
    >much never used, I thought there might be a way to turn this off via
    >php.ini.
    There isn't.

    --
    Andy Hassall :: andy@andyh.co.u k :: http://www.andyh.co.uk
    http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

    Comment

    Working...