Hello,
I'm having some problems with a file upload...
I'm getting this error:
Notice: Undefined index: uploads in...(location)
I've tested for the $_FILES array and it's not there. The form is below, and everything should be set up properly (I've set up file uploads many times). Also, I've checked phpinfo() and file uploads are on and I'm not getting anywhere near the maximum file size.
All other submitted information is coming through as it should.HTML Code:<form enctype="multipart/form-data" method="post" action="index.php?p=add-category"> <input type="hidden" name="MAX_FILE_SIZE" value="1048576" /> <table id="cms"> <tr> <td class="f_label" class="mandatory">Name:</td><td><input type="text" name="name" value="<?php if(isset($_POST['name'])) echo stripslashes($_POST['name']); ?>" /></td> </tr> <tr> <td class="f_label">Description:</td><td><textarea name="description" rows="5" cols="20"><?php if(isset($_POST['description'])) echo stripslashes($_POST['description']); ?></textarea></td> </tr> <tr> <td class="f_label">Image:</td><td><input type="file" name="uploads" /></td> </tr> <tr> <td><input type="hidden" name="submitted" value="TRUE" /> <input type="hidden" name="MAX_FILE_SIZE" value="1048576" /> </td><td><input type="submit" name="submit" value="Add Category" class="subbtn" /></td> </tr> </table> </form>
Any help would be greatly appreciated.
Cheers,
Jon




Bookmarks