Posted by Justin Koivisto on 12/10/05 00:39
Sergei Riaguzov wrote:
> I have a very strange behaviour with POST keys.
>
> Consider a test:
>
> wtf.html:
>
> === Cut ===
> <form action="eh.php" method="POST">
> <input type="checkbox" name="many spaces and. . dots. . "/>
> <input type="submit" value="Submit">
> </form>
> === Cut ===
>
> eh.php:
>
> === Cut ===
> <?php
> print_r($_POST);
> ?>
> === Cut ===
>
> When we check the checkbox and click the Sumbit button we will see:
>
> Array ( [many_spaces_and____dots____] => on )
>
> It is send to server normally:
>
> many+spaces+and.+.+dots.+.+=on
>
> but in $_POST (or $HTTP_POST_VARS) we see what we see. Any ideas?
>
See the "cannot use "-" in variable names?" thread...
Basically, what I thought was any character that can't be used in a
variable name was automagically converted to an underscore, but
apparently "-" aren't any more.
--
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
[Back to original message]
|