Page 1 of 1

Posting to url

Posted: Mon Sep 02, 2013 3:19 am
by TKYTKY
Hi all ,

i wanted to post stuffs to a server so i found a sample postserver on the internet and try to post it to the server .

Code: Select all

   put urlEncode(field "comment") into tcomment   

   put "comment=", tcomment into n
   replace"," with "" in Pcomment


  post Pcomment to url "http://posttestserver.com/post.php"

  if the result is not empty then
     answer it
  else
     answer "Unsuccessful"
  end if
  
 
. is there something wrong with my codes ?

Re: Posting to url

Posted: Mon Sep 02, 2013 8:58 am
by bangkok
Voila :

Code: Select all

 put urlEncode(fld "comment") into tcomment   
   
   put "comment="& tcomment into Pcomment
   
   post Pcomment to url "http://posttestserver.com/post.php"
   
   answer it