There are no errors! The code just stops working I will add a separate field for the file upload see if it makes a difference.
Edit:
I tried putting this code:
PHP Code:
$MAXIMUM_FILESIZE = 1024 * 200; // 200KB
$MAXIMUM_FILE_COUNT = 10; // keep maximum 10 files on server
//echo exif_imagetype($_FILES['Filedata']);
if ($_FILES['sendfile']['size'] <= $MAXIMUM_FILESIZE) {
move_uploaded_file($_FILES['sendfile']['tmp_name'], "./temporary/".$_FILES['sendfile']['name']);
//if ($type == 1 || $type == 2 || $type == 3) {
rename("./temporary/".$_FILES['sendfile']['name'], "./images/".$_FILES['sendfile']['name']);
}
Above the code for the database plus using:
HTML Code:
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" name="products" target="_self">
<input type="hidden" name="MAX_FILE_SIZE" value="30000" />
<label class="login-label" for="product">Product Name:</label><br /><input name="pName" type="text" id="pName"/>
<br /><label class="login-label" for="pPrice">Product Price:</label> <br />
<input name="pPrice" type="text" id="pPrice" />
<br />
<label class="login-label" for="pImagePath">Image Path:</label><br /><input name="pImagePath" type="type" id="pImagePath"/>
<br /><label class="login-label" for="pImageType">Image Type:</label> <br />
<input name="pImageType" type="text" id="pImageType" />
<br /><label class="login-label" for="pImageType">Upload File:</label> <br />
<input name="sendfile" type="file" id="sendfile" />
<br />
<input name="submit" type="submit" value="Submit" />
<input name="reset" type="reset" value="Reset" />
</form>
However, the file sending doesn't work while the database input mysteriously works. I think part of the problem in the caching in Firefox.