|
Posted by Justin Koivisto on 12/09/05 23:12
Malcolm Dew-Jones wrote:
> Justin Koivisto (justin@koivi.com) wrote:
>
> : Kim André Akerø wrote:
> : >
> : > You can safely use "_" (underscore) instead. If you need to use it in a
> : > query string or form field, use $_POST, $_GET or $_REQUEST.
>
> : - characters in those arrays are replaced by _ automagically...
>
> There must be a config setting to do that, cause I have never observed
> that behaviour. The following uses - in the html parameter names.
>
>
> <?php
>
> echo "the-name = [";
> echo $_REQUEST['the-name'];
> echo "]\n";
>
>
> echo "hidden-name = [";
> echo $_REQUEST['hidden-name'];
> echo "]\n";
>
> ?>
>
> <form>
>
> <input type="text" name="the-name" />
>
> <input type="hidden" name="hidden-name" value="a hidden value" />
>
> <input type=submit />
>
> </form>
>
>
Now I wonder if I have that mixed up with something else dealing with
hyphens in the field names of posted forms... (PDF forms perhaps?)
I know it came up once in a script I was debugging a couple years ago,
so maybe it was something from a previous version, or maybe it was if
register_globals = 1
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
Navigation:
[Reply to this message]
|