Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /* Prog: upload.php
- * Desc: uploads files into the file folder
- */
- if(!isset($_POST['upload']))
- {
- include("upload.inc");
- }
- else
- {
- if($_FILES['uploadedFile']['tmp_name'] == "none")
- {
- echo "<p>File did not upload</p>\n";
- include("upload.inc");
- exit();
- }
- else
- {
- move_uploaded_file($_FILES['uploadedFile']['tmp_name'],"../uploads/{$_FILES['uploadedFile']['name']}");
- }
- }
- ?>
- /* Form section of included document */
- <?php
- /* Prog: upload.inc
- * Desc: html form for the upload
- */
- ?>
- <form type = 'multipart/form-data' action = 'uploadImages.php' method = 'POST'>
- <input type = 'hidden' name = 'MAX_FILE_SIZE' value = '2000000' />
- <input type = 'file' name = 'uploadedFile' size = '60' />
- <input type = 'submit' name = 'upload' value = 'Upload File' />
- <input type = 'reset' value = 'Reset Form' />
- </form>
Add Comment
Please, Sign In to add comment