Jump to content

File Upload


leequalls

Recommended Posts

I have a form here http://party934.com/artist_contact.php that is supposed to upload 2 files. When the submit button is clicked the files do not upload however the data in the form is being sent.

 

This is how Im calling the files on submit:

$file_temp = $_FILES['mp3']['tmp_name'];
$mp3name = $_FILES['mp3']['name'];
$file_size = $_FILES['mp3']['size'];
$file_err = $_FILES['mp3']['error'];

$ifile_temp = $_FILES['image']['tmp_name'];
$imagename = $_FILES['image']['name'];
$ifile_size = $_FILES['image']['size'];
$ifile_err = $_FILES['image']['error'];

Link to comment
https://forums.phpfreaks.com/topic/265023-file-upload/
Share on other sites

Your <form ... tag does not have the enctype attribute that is needed to allow files to be uploaded and you are missing a closing </form> tag.

 

I recommend reading the upload handling section in the php.net documentation - http://us.php.net/manual/en/features.file-upload.php

Link to comment
https://forums.phpfreaks.com/topic/265023-file-upload/#findComment-1358083
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.