0

im trying to upload 2 vales to simple php form which looks like this:

<meta charset="UTF-8">
<form method="post">
    <input type="text" name="id"/>
    <textarea name="data"></textarea>
    <input type="submit" name="add" value="go"/>
</form>

using only webclient i did some search on it, and found that this would work like this:

        Dim data As New NameValueCollection()
    data.Add("id", "7799")
    data.Add("data", "content")
    Dim client As New WebClient
    client.UploadValues("http://mywebsite/upload.php", data)

but didnt work for me :/ any ideas what im missing?

user2618553
  • 115
  • 1
  • 2
  • 8
  • So, what's the result. Your Textarea is not being filled up, by chance? – Jimi Nov 30 '17 at 23:51
  • Is this all of the code? I see nothing in PHP that is consuming any kind of POST or FILE vars. Maybe it might be worth researching the top answer in this following post as they appear to be doing a similar operation: https://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data/2996904#2996904 – D. Foley Dec 01 '17 at 11:07

0 Answers0