You are here: Dot in POST parameter name gets converted to "_" « PHP Programming Language « IT news, forums, messages
Dot in POST parameter name gets converted to "_"

Posted by Jeremy on 06/03/07 22:34

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация