Forum Moderators: coopster

Message Too Old, No Replies

About Php Post Problem , Please Help Me

Use PHP Form Can Post Data to Another Php script

         

helloeverybody

4:09 pm on Dec 5, 2007 (gmt 0)

10+ Year Member



Now I wan't to get the post data from a vc++ software, The data was posted by vc++, but I can't get the data.

If I use a php form post data , I can Get , I don't Know Why?

PHP_Chimp

8:28 pm on Dec 5, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I dont know anything about vc++ (something to do with my disdain for all Microsoft related products), however are you saying that if you use a GET request then you have access to the data?
Or are you not getting any data no matter what method you try?

Further questions -
How are you posting the information i.e. are you posting through a proxy or not?
Are you getting an error? If so what is it?

Welcome along to Webmaster World.

[edited by: PHP_Chimp at 8:29 pm (utc) on Dec. 5, 2007]

helloeverybody

12:58 am on Dec 6, 2007 (gmt 0)

10+ Year Member



yeah, I get no wrong code. but a empty array.

If vc++ use get method, the php can get the data ,

but the vc++ use post method , the php can't , only get a empty array.

and the asp.net can get the post data:
here is the code:
foreach (string str in Request.QueryString.AllKeys)
Response.Write(str + ":" + Request.QueryString[str] + "");

foreach (string str in Request.Form.AllKeys)
Response.Write(str + ":" + Request.Form[str] + "");

but use in php :

foreach ($HTTP_POST_VARS as $name=>$value) {
global $HTTP_POST_VARS;
echo $name."=>".$value."<br />";
}
foreach ($HTTP_GET_VARS as $name=>$value) {
global $HTTP_GET_VARS;
echo $name."=>".$value."<br />";
}

can't get the post data.

helloeverybody

5:27 am on Dec 6, 2007 (gmt 0)

10+ Year Member



Please Help Me! Thank You very much!

Habtom

5:31 am on Dec 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Change $HTTP_POST_VARS to $_POST
Change $HTTP_GET_VARS to $_GET