I am trying to upload files with Ajax & PHP but the problem is I am not able to send input type text which contains the id of the folder.

Here is my HTML:

```
<form method="post" enctype="multipart/form-data"  action="uploadify.php">
        <input type="file" name="images" id="images" multiple />
        <input type="hidden" name="eid" value="<?php echo $eid;?>" />
        <input type="btn submit" id="btn" value="Upload" />
      </form>

    <div id="response"></div>
    <ul id="image-list">

    </ul>

```

Here is my JavaScript:

```
(function () {
    var input = document.getElementById("images"), 
        formdata = false;

    function showUploadedItem (source) {
        var list = document.getElementById("image-list"),
            li   = document.createElement("li"),
            img  = document.createElement("img");
        img.src = source;
        li.appendChild(img);
        list.appendChild(li);
    }   

    if (window.FormData) {
        formdata = new FormData();
        document.getElementById("btn").style.display = "none";
    }

    input.addEventListener("change", function (evt) {
        document.getElementById("response").innerHTML = "Uploading . . ."
        var i = 0, len = this.files.length, img, reader, file;

        for ( ; i < len; i++ ) {
            file = this.files[i];

            if (!!file.type.match(/image.*/)) {
                if ( window.FileReader ) {
                    reader = new FileReader();
                    reader.onloadend = function (e) { 
                        showUploadedItem(e.target.result, file.fileName);
                    };
                    reader.readAsDataURL(file);
                }
                if (formdata) {
                    formdata.append("images[]", file);
                }
            }   
        }

        if (formdata) {
            $.ajax({
                url: "uploadify.php",
                type: "POST",
                data: formdata,
                processData: false,
                contentType: false,
                success: function (res) {
                    document.getElementById("response").innerHTML = res; 
                }
            });
        }
    }, false);
}());

```

And here is my PHP:

```
<?php
//upload.php
$eid = $_POST['eid'];
$output_dir = "./images/icons/".$eid."/screenshots/";
if (!file_exists($output_dir) and !is_dir($output_dir)) {
    mkdir($output_dir);  
}

foreach ($_FILES["images"]["error"] as $key => $error) {
    if ($error == UPLOAD_ERR_OK) {
        $name = $_FILES["images"]["name"][$key];
        move_uploaded_file( $_FILES["images"]["tmp_name"][$key], "$output_dir" . $_FILES['images']['name'][$key]);
    }
}

echo "<h2>Successfully Uploaded Images $eid</h2>";

```

What I want to do is that I am sending input type hidden name=eid but don't know what's wrong, why am I not able to send this through my JS function?