title: Photo upload with parameters to a PHP page
body: <p>I need to upload file the server via .php file, and i've got this information:</p>
  
  <blockquote>
    <p>Make a call to the: /uploadFiles.php with these parameters:</p>
    
    <ul>
    <li>$_POST['user_id']   </li>
    <li>$_FILES['image']</li>
    </ul>
  </blockquote>
  
  <p>So, my question is what does "call php with parameters $_GET['user_id'] and $_FILES['image']" mean, and how do I make a call to php sucessfully.</p>
  
  <p>I've already, for other needs, succesfully made call to the server via "POST" method, like this:</p>
  
  <pre><code>var client = WebClient();
  client.UploadStringCompleted += new UploadStringCompletedEventHandler(client_UploadStringCompleted);
  client.Headers["Content-Type"] = "application/x-www-form-urlencoded";
  client.Encoding = Encoding.UTF8;
  
  string toSend = "http://example.com/submit.php?userid=10";
  client.UploadStringAsync(new Uri(toSend), "POST", "");
  </code></pre>
  
  <p>Of course, I did much research before posting, tried a lot of solutions from topics here:
  <a href="https://stackoverflow.com/search?q=wp7+photo+upload">https://stackoverflow.com/search?q=wp7+photo+upload</a></p>
  
  <p>Thank you in advance for your help.</p>
  
  <p><strong>Update:</strong></p>
  
  <p>I found out all i need is to simulate this SIMPLE HTML UPLOAD form:</p>
  
  <pre><code>&lt;form method='POST' enctype='multipart/form-data' action='http:/myserver.com/upload.php'&gt;
  File to upload &lt;input type=file name=image&gt;&lt;br&gt;
  user_id &lt;input type=text name=user_id&gt;&lt;br&gt;
  &lt;br&gt;
  &lt;input type=submit value=Press&gt; to upload the file!
  &lt;/form&gt;
  </code></pre>
  
  <p>When i run this in web browser i get good response from upload.php, so i just need the way to simulate this in WP7, i tried everything, i'm desperate.</p>
  
  <p>I used <a href="http://mytoolkit.codeplex.com/wikipage?title=Http" rel="nofollow noreferrer">myToolkit</a> like this, but same response like when i used webclient, restsharp, hammock:</p>
  
  <pre><code>var request = new HttpPostRequest("http://myserver.com/upload.php");
  request.Data.Add("user_id", "389096"); // POST data
  request.Files.Add(new HttpPostFile("image", "", e.ChosenPhoto, true)); // POST file
  Http.Post(request, RequestFinished);
  </code></pre>