I am trying to see the restrictions of $_GET global variable and when I use the URL localhost/test/test.php?abc.def I am getting the variable abc_def in the global variable $_GET, any ideas? Any other restrictions?
OmniX
21
Practically a Master Poster
Recommended Answers
Jump to Posthttp://us3.php.net/variables.external
Explains why those periods are converted to underscores.
Through the comments there are also other characters that are mentioned that appear to be converted as well.
Jump to PostIt looks like only POST values get sent to php://input.
I reworked the function so it gets it's values from the $_SERVER variable.<?php function getRealGet() { $pairs = explode( '&', $_SERVER['QUERY_STRING'] ); $vars = array(); foreach ($pairs as $pair) { $nv = explode("=", $pair); $name = …
All 6 Replies
mschroeder
251
Bestower of Knowledge
Team Colleague
OmniX
commented:
useful link, thanks.
+4
OmniX
21
Practically a Master Poster
mschroeder
251
Bestower of Knowledge
Team Colleague
OmniX
21
Practically a Master Poster
mschroeder
251
Bestower of Knowledge
Team Colleague
OmniX
commented:
nice code example
+4
OmniX
21
Practically a Master Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.