why does this code not show in web Email image send | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

why does this code not show in web Email image send

<?php if (isset($_POST)&& !empty($_POST)){ //aaaaa if (!empty($_FILES['attachment']['name'])){ $file_name = $_FILES['attachment']['name']; $temp_name = $_FILES['attachment']['tmp_name']; $file_type = $_FILES['attachment']['type']; //aaa $base = basename($file_name); $extension = substr($base, strlen($base)-4, strlen($base)); //assss $allowed_extensions = array(".doc".".docx",".pdf",".zip",".png"); //sasas if(in_array($extension,$allowed_extensions)){ $from = $_POST['email']; $to = "send@gmail.com"; $subject = "sdasdasd"; $message = "asdasdasd"; //asass $file = $temp_name $content = chunk_split(base64_encode(file_get_contents($file))); $uid = md5(uniqid(time())); //asass $header = "From: ".$from."\r\n"; $header = "Reply-To: ".$replyto."\r\n"; $header ..= "MIME-Version: 1.0\r\n"; //dddddd $header .= "Content-Type: multipart/mixed; boundary= "".$uid."\"\r\n\r\n"; $header .= "This is a multi-part message in MIME format.\r\n"; //assa $header .= "--".$uid."\r\n"; $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n"; $header .= "Content-Transfer-Encoding: base64\r\n"; $header .= "Content-Disposition: attachment; filename=\"".$file_name."\"\r\n\r\n"; $header .= "Content-type:text/plain; charset=iso-8859-1\r\n"; $header .= "Content-Transfer-Encoding: 7bit\r\n\r\n";

14th Feb 2019, 8:34 AM
Chinnapat Wongplub
Chinnapat Wongplub - avatar
1 Answer
+ 1
Can you show your markup code? so we know where and how you interact with it. :)
17th Feb 2019, 9:07 AM
avatarluca
avatarluca - avatar