This is the php code I'm using for my form (multiple files upload):
Code:
<?php
$to = "emailaddress@gmail.com";
$subject= "Request For Quote";
$todayis = date("l, F j, Y, g:i a") ;
$subject= "Request For Quote";
$name = $_POST['name'];
$lastname = $_POST['lastname'];
$email = $_POST['email'];
$cmname = $_POST['cmname'];
$message = "
Date ------- $todayis
Name ------ $name
Last Name ------- $lastname
Email ----------- $email
Company --------- $cmname
";
  $mime_boundary="==Multipart_Boundary_x".md5(mt_rand())."x";
        $headers = "From: $email\r\n" .
     "MIME-Version: 1.0\r\n" .
        "Content-Type: multipart/mixed;\r\n" .
        " boundary=\"{$mime_boundary}\"";
     $message = "This is a multi-part message in MIME format.\n\n" .
        "--{$mime_boundary}\n" .
        "Content-Type: text/plain; charset=\"iso-8859-1\"\n" .
        "Content-Transfer-Encoding: 7bit\n\n" .
     $message . "\n\n";
     foreach($_FILES as $userfile)
     {
        $tmp_name = $userfile['tmp_name'];
        $type = $userfile['type'];
        $name = $userfile['name'];
        $size = $userfile['size'];
        if (file_exists($tmp_name))
        {
           if(is_uploaded_file($tmp_name))
           {
              $file = fopen($tmp_name,'rb');
              $data = fread($file,filesize($tmp_name));
              fclose($file);
              $data = chunk_split(base64_encode($data));
           }
           $message .= "--{$mime_boundary}\n" .
              "Content-Type: {$type};\n" .
              " name=\"{$name}\"\n" .
              "Content-Disposition: attachment;\n" .
              " filename=\"{$fileatt_name}\"\n" .
              "Content-Transfer-Encoding: base64\n\n" .
           $data . "\n\n";
        }
     }
     $message.="--{$mime_boundary}--\n";
if (mail($to, $subject, $message, $headers))
 echo "Mail sent successfully.";
else
echo "Error in mail";
?>
Now I'd like to add a multiple select option box, like this:
Code:
        <select data-placeholder="Select Multiple Items" class="chosen-select" multiple>
            <option>Item 1</option>
            <option>Item 2</option>
            <option>Item 3</option>
            <option>Item 4</option>
        </select>
That clearly doesn't upload the selected options, so I tried this:
Code:
<option name="option" type="text" id="option">Item 1</option>
adding this:
Code:
$option= $_POST['option'];
but it doesn't work.

Also this doesn't work, as it shows Array:
Code:
<select name="option[]" data-placeholder="Select Multiple Items" class="chosen-select" multiple>
Here's a link to the complete form: https://www.lichaamengeest.be/nieuw.php
Can anyone help me out here, please, adding the multiple select to the php code?
Thanks.