Board index » delphi » what am i doing wrong? Post in INDY

what am i doing wrong? Post in INDY

Hello everybody!

Have php script:

echo "Values submitted via POST method:<br>";
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
    echo "$key => $val<br>";

Quote
}

and Delphi Code:

   PS:=TstringList.Create;
   AR:=TStringStream.Create('');
   PS.Add('var1=MEMBER1') ;
   try
    try
      fpsm.psconn.Post(psurl+'test.php',PS,AR);
      showmessage(AR.DataString);

it returns ONLY "Values submitted via POST method:<br>"

What am I doing wrong?

Please Help!!

Dmitry
  www.photosight.ru

 

Re:what am i doing wrong? Post in INDY


Maybe you forgot

HTTP.Request.ContentType := 'application/x-www-form-urlencoded'

"Dmitry Leesin" <l...@emax.ru> ha scritto nel messaggio
news:3c913285$1_2@dnews...

Quote
> Hello everybody!

> Have php script:

> echo "Values submitted via POST method:<br>";
> reset ($HTTP_POST_VARS);
> while (list ($key, $val) = each ($HTTP_POST_VARS)) {
>     echo "$key => $val<br>";
> }

> and Delphi Code:

>    PS:=TstringList.Create;
>    AR:=TStringStream.Create('');
>    PS.Add('var1=MEMBER1') ;
>    try
>     try
>       fpsm.psconn.Post(psurl+'test.php',PS,AR);
>       showmessage(AR.DataString);

> it returns ONLY "Values submitted via POST method:<br>"

> What am I doing wrong?

> Please Help!!

> Dmitry
>   www.photosight.ru

Other Threads