NOTE: The issue was resolved, I was apparently editing the wrong file. Silly me. Thanks
I am using an image upload script that posts file to the a PHP script that then saves the file to the server. Here is the upload form:
<form action="upload.php" method="post" name="image_upload" id="image_upload" enctype="multipart/form-data">
<input type="hidden" name="forumuser" value="testname" />
<input type="hidden" name="email" value="[email protected]" />
<input type="file" size="25" name="uploadfile" id="uploadfile" class="file margin_5_0" onchange="ajaxUpload(this.form);" />
</form>
There is no submit as it is done through an AJAX call. The image is received and uploaded to the server, but my PHP script fails to actually receive any POST variables:
$forumuser = $_POST['forumuser'];
$email = $_POST['email'];
Echo'ing these variables result in nothing. This is likely do to the enctype
, as I have found people who switched it have found that the POST variables will work but the file upload does not. None of the solutions in the PHP bug report have worked for me.
Here are some settings in the ajax.js file:
form.setAttribute("target","uploadform-temp");
form.setAttribute("action",get_url);
form.setAttribute("method","post");
form.setAttribute("enctype","multipart/form-data");
form.setAttribute("encoding","multipart/form-data");
I appreciate any assistance.