how do i separate name/value pairs in http post data
Posted on 2004-10-09
i have a vb.net app, using httpwebresponse et al, that automates posting data from html forms to a php script.
the data is currently posted to a noddy php script that just echoes the _POST variables.
using ie to post the data from a form i can see the name/value pairs like this:
but if i build the request by hand in vb the name/value pairs run together and aren't separate, and count(_POST) is zero:
the code i'm using to build the postdata string (which is, of course, encoded before posting) is:
dim postdata as string
postdata = name1.text & chrw(63) & value1.text
postdata = postdata & vbcr & name2.text & chrw(63) & value2.text
what am i doing wrong?
i may be being a bit dim, but i can't find any hints in the help.