Hello i am using the following code:
announcement.html:
uploader.php:Code:<form enctype="multipart/form-data" action="uploader.php" method="POST"^gt; <input type="hidden" name="MAX_FILE_SIZE" value="1000" /> Upload File: <input name="uploadedfile" type="file" /> <input type="submit" value="Upload File" /> </form>
This is not currently on a server, i will upload it later. At the moment i am running this off my computer. When i click upload after i select my file internet explorer prompts me to download the file uploader.php .Code:$target_path = "uploads/"; $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo “The file “. basename( $_FILES['uploadedfile']['name']). ” has been uploaded”; } else{ echo “There was an error uploading the file, please try again!”; }
I want the code in that file to take action i don't want to download it. What is wrong?




Reply With Quote