multipart/form-data

I’m designing a niche site to allow members to upload movies to my device (like Youtube). I’d like them to include 1video, 1 image and submit various fieds upon form. When submitted I’d like the form that will send me an email considering the uploaded file names plus the various data in the other form job areas. I’ve set way up the members area that will upload files (not since secure as It’s safe to like) but our problem now is considering the multipart/form-data. I cannot figure out how to make it send out me an email. It seemed like it could be an easy fix but after making an attempt on and away for about Few months now I’m getting near to giving up on performing it myself. I tried producing the process a couple of form by keeping the 1st form distribute the files and then send the uploaded file names on the next form nonetheless that wouldn’t work either. It would send additional form fields but not the uploaded archive names. Mabe I quit to quickly but if this might work my problem can be solved. Any suggestions will be greatly appreciated.

Which Application Server are you currently using (PHP, CF, ASP)

When my type is submitted POST receive an email notifying me of a file upload, including all the form field names but it doesn’t send the info provided. I think there is something wrong with that " $membername" portion of the code. I’m asuming that this " $" part is suppose to add the " membername" field from the email
THE NEXT IS MY PHP SIGNAL:
< php
$msg. =" Sort fields submitted via mysite. com\r\n\r\n";
$msg. =" Fellow member Name: $membername\r\n";
$msg. =" Video tutorial Uploaded: $uploaded\r\n";
$msg. =" Name Of Video: $titleofvideo\r\n";
$msg. =" Artist’s Title: $bandname\r\n";
$msg. =" Earlier Artist’s Name: $priorartistname\r\n";
$msg. =" Style Of Music: $genreofmusic\r\n";
$msg. =" Residence Town: $hometown\r\n";
$msg. =" Rings Website: $bandswebsite\r\n";
$msg. =" Second Website: $secondbandwebsite\r\n";
$msg. =" Say: $select\r\n";
$msg. =" Email TO NOT POST: $emailnottopost\r\n";
$msg. =" Phrases Of Service: $termsofservice\r\n";
$to=" emtmyemail. com";
$subject=" Files Happen to be Uploaded";
$header. =" Reply-To: $Email";
mail($to, $subject, $msg, $header);
$target = " myuploadfile/";
$target = $target. basename( $_FILES’uploaded”name’);
$ok=1;
//This will be our size affliction
if ($uploaded_size > 350000)

reveal " Your file is too big. < br> ";
$ok=0;

//This will be our limit record type condition
if ($uploaded_type ==" text/php" )

reveal " No PHP files< br> ";
$ok=0;

//Here we check that $ok were set to 0 by one
if ($ok==0)

Reveal " Sorry your file were uploaded";

//If everything can be ok we try to upload it
else

if(move_uploaded_file($_FILES’uploaded”tmp_name’, $target))

reveal " Your VIDEO CLIP file ". basename( $_FILES’uploadedfile”name’). " has been uploaded. ";

else

reveal " Sorry, there seemed to be a problem posting your file. ";

>

Is your form being sent in via POST and also GET Just using $membername is commonly an indication that you’re expecting something like register_globals to get enabled, which were happening by default within PHP versions considering that 4. 2. something I think. Instead, you have to refer to also the $_GET or even the $_POST superglobal. So as an alternative to $membername you would use minicode$_GET’membername’/minicode or minicode$_POST’membername’/minicode based on whether the sort is submitted, once again, via POST or GET.

I do believe it’s getting nearer. Thanks for a person’s help.
I used your own $_POST ‘membername’ system because I use the post method in my form because the file upload.
The next is exactly just what exactly I now be in my email.
Sort fields submitted via mywesite. com
Fellow member Name: Array ‘membername’
Files Uploaded: Array ‘uploaded’
Name Of Video: Variety ‘titleofvideo’
Artist’s Title: Array ‘bandname’
Earlier Artist’s Name: Variety ‘priorartistname’
Style Of Music: Variety ‘genreofmusic’
Residence Town: Array ‘hometown’
Rings Website: Array ‘bandswebsite’
Second Website: Array ‘secondbandwebsite’
Say: Array ‘select’
Email TO NOT POST: Array ’emailnottopost’
Phrases Of Service: Variety ‘termsofservice’

Er… Can we discover your code once more That looks a little bit odd.

I apologize, this is the PHP code:
< php
$msg. =" My personal Form\r\n\r\n";
$msg. =" Sort fields submitted via my. com\r\n\r\n";
$msg. =" Fellow member Name: $_POST ‘membername’\r\n";
$msg. =" Files Uploaded: $_POST ‘uploaded’\r\n";
$msg. =" Name Of Video: $_POST ‘titleofvideo’\r\n";
$msg. =" Artist’s Title: $_POST ‘bandname’\r\n";
$msg. =" Earlier Artist’s Name: $_POST ‘priorartistname’\r\n";
$msg. =" Style Of Music: $_POST ‘genreofmusic’\r\n";
$msg. =" Residence Town: $_POST ‘hometown’\r\n";
$msg. =" Rings Website: $_POST ‘bandswebsite’\r\n";
$msg. =" Second Website: $_POST ‘secondbandwebsite’\r\n";
$msg. =" Say: $_POST ‘select’\r\n";
$msg. =" Email TO NOT POST: $_POST ’emailnottopost’\r\n";
$msg. =" Phrases Of Service: $_POST ‘termsofservice’\r\n";
$to=" emtmy. com";
$subject=" Files Happen to be Uploaded";
$header. =" Reply-To: $Email";
mail($to, $subject, $msg, $header);
$target = " myuploadfile/";
$target = $target. basename( $_FILES’uploaded”name’);
$ok=1;
//This will be our size affliction
if ($uploaded_size > 350000)

reveal " Your file is too big. < br> ";
$ok=0;

//This will be our limit record type condition
if ($uploaded_type ==" text/php" )

reveal " No PHP files< br> ";
$ok=0;

//Here we check that $ok were set to 0 by one
if ($ok==0)

Reveal " Sorry your file were uploaded";

//If everything can be ok we try to upload it
else

if(move_uploaded_file($_FILES’uploaded”tmp_name’,

This entry was posted in Web Design and tagged , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *