php $_post and $http_post_vars not retrieving url parameters

Category: Website

starnaly
Asked:
2012-03-16 4:55 pm EST

Hits: 1,443
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

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Best answer chosen by User

0

BradM
Staff
5,399 Points
2012-03-16 5:03 pm EST
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

You must login before you can post a comment about this answer.

Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!