Can anyone help me with the code why it is wrong . What Should i need to do to correct. Thank for your help . Pls help me
if (is_uploaded_file($fileatt3)) {
$file = fopen($fileatt3,'rb');
$data = fread($file,filesize($fileatt3));
fclose($file);
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$data = chunk_split(base64_encode($data));
$body .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt3_type};\n" .
" name=\"{$fileatt3_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$body . "\n\n" .
"--{$mime_boundary}--\n";
}
if (is_uploaded_file($fileatt2)) {
$file = fopen($fileatt2,'rb');
$data = fread($file,filesize($fileatt2));
fclose($file);
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$data = chunk_split(base64_encode($data));
$body .= "--{$mime_boundary}\n" .
"Content-Type: {$fileatt2_type};\n" .
" name=\"{$fileatt2_name}\"\n" .
"Content-Transfer-Encoding: base64\n\n" .
$body . "\n\n" .
"--{$mime_boundary}--\n";
}