Hi all,
I've seen some weird (to me) behaviour where PHP (I think PHP is the
culprit) turns dots into underscores in the names in my form data.
Below is a simple example (play.php):
<?php
print "<html><head><title>Test Page</title></head><body>\n";
foreach($_GET as $key => $value) {
print $key . " => " . $value . "<p>\n";
}
print '<form method=GET action="play.php">';
print '<input type=submit NAME="go.name" VALUE="go.value"><p>';
print "</form>\n";
print "</body></html>\n";
?>
When I click on the "go.value" button, the URL I get is:
http://localhost/play.php?go.name=go.value
But the returned page prints the following:
go_name => go.value
i.e. in the $_GET array, the key "go.name" has been turned into
"go_name".
(and POST does the same thing).
As far as I can see, the HTML spec clearly allows the NAME field to
contain the "." (dot) character. So why are my dots turning into
underscores? Is this a PHP "feature", or something else?
(I am running Apache on a RH9 Linux machine; with no non-default setup
variables for either Apache or PHP, as far as I am aware).
Any help appreciated.
--
Regards,
Peter Ballard
Adelaide, AUSTRALIA
pb******@ozemail.com.au
http://members.ozemail.com.au/~pballard/