php $_post and $http_post_vars not retrieving url parameters

Avatar
  • Answered
My website at www.crystalclimate.com seems to be working quite well. However, I'm writing a desktop weather app in C++ and am using the Visual C++ HTTP library to access the database on the server. When I send a request for the following information it is processed and data is returned to my desktop app accordingly:

"www.crystalclimate.com/php/remoteProgramScripts/retrieveCountry.php".

Notice there are no parameters beyond the script. However, when requesting information from the following script, the script processes but returns absolutely no data:

"www.crystalclimate.com/php/remoteProgramScripts/retrieveProvince.php?countryAbbr=CAN".

I have tested this extensively and it seems to be ignoring the parameter that I am sending it.

What kind of setting is required for this to work?

Thanks
Avatar
BradM
Hi starnaly, When trying to get data passed in the url, as in: www.crystalclimate.com/php/remoteProgramScripts/retrieveProvince.php?countryAbbr=CAN .. you're trying to get data passed with GET (instead of POST). I'm not very familiar with http_post_vars, but some quick searches online shows that it may actually be deprecated in php 5. When I get variables from the URL, I use the following syntax:
$variable = $_GET['countryAbbr'];
I would recommend trying the above method, and be sure to get back with us if that doesn't help. Thanks! - Brad