By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,805 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,805 IT Pros & Developers. It's quick & easy.

Dot in POST parameter name gets converted to "_"

P: n/a
I've noticed that a dot in a POST parameter name - i.e.

<input name="person.first_name" type="text">

get converted to an underscore when populated into $_POST. Presumably
this is a throwback to register_globals, 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_globals 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
Jun 3 '07 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Sun, 03 Jun 2007 15:34:07 -0700, Jeremy <je****@pinacol.comwrote:
>I've noticed that a dot in a POST parameter name - i.e.

<input name="person.first_name" type="text">

get converted to an underscore when populated into $_POST. Presumably
this is a throwback to register_globals, 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_globals is pretty
much never used, I thought there might be a way to turn this off via
php.ini.
There isn't.

--
Andy Hassall :: an**@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool
Jun 3 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.