I am trying to upload a picture from the Pictures Library (on WP7) and save it in a folder on the server.

On the server, I'm using PHP to receive the file using POST Method. The PHP Code is:
Code:
<?php
$uploads_dir = 'files/'; //Directory to save the file that comes from client application.
if ($_FILES["file"]["error"] == UPLOAD_ERR_OK) {
    $tmp_name = $_FILES["file"]["tmp_name"];
...