Why do the $_GET variables get automatically changed to lowercase in Server Connect? Is there something I am just missing? $_POST variables stay the way I enter them, but $_GET variables get changed? Is there some logic there that I am missing or not understanding?
I used to mention this a lot back when was importing Projects in to the early versions of Wappler. Drove me crazy for a long while and I sort of became fixated on it. Suffice to say I have come around to it these days. I'm sure it was explained to me by George and Theodor several times (more than likely drove them mad too with the ball-ache of me keep on about it) but I can't remember why? Probably just good practice I suppose..?
Thats been the case since the very early days of wappler. May have actually been during version 1 development that it was intriduced that all GET variables would be forced to lower case.. There was a reason behind it but i cant remember, was about 7 years ago!
May have been related to Windows not being case sensitive but Linux based systems such as a Mac being so. I seem to recall there were a lot of issues in the early days.
GET variable names need to be lowercase. When you send a GET variable to the Server Action, it is passed as an HTML attribute:
<dmx-serverconnect id="serverconnect1" url="/dmxConnect/api/test.php" dmx-param:myparam="123"></dmx-serverconnect>
Since HTML attributes should always be lowercase, the GET variable names must also be lowercase.
For POST that is not a requirement, as your form input names can use mixed case.
It is also advisable to keep the query variables always to lower case to avoid mismatch if you type them. Otherwise if in the wrong case it they will do nothing and you will be looking for the problem for a very long time ...
So to prevent such problems and as Teodor said to be able to pass them as html attributes, we enforce lower case.
ok, thanks, well, good to know. Was just driving me crazy. I'll just know now to always use lower case.
Thanks!