I have a form that can send an email attachment. Everything is working (subject , attachment, etc...) except that the main message is empty. What did I do wrong?

PHP Code:
// send the message
$att         $_FILES['design'];
$att_path     $_FILES['design']['tmp_name'];
$att_name     $_FILES['design']['name'];
$att_size     $_FILES['design']['size'];
$att_type    $_FILES['design']['type'];

$fp    fopen($att_path"rb");
$file fread($fp$att_size);
fclose($fp);

$num md5(time());
$str "==Multipart_Boundary_x{$num}x";

$file chunk_split(base64_encode($file));

$hdr "MIME-Version: 1.0\r\n";
$hdr .= "Content-Type: multipart/mixed; ";
$hdr .= "boundary=\"{$str}\"\r\n";
$hdr .= "From: $from \r\n";

$msg "This is a multi-part message in MIME format\r\n\n";
$msg .= "--{$str}\r\n";
$msg .= "Content-Type: text/plain; charset=\"iso-8859-1\"\r\n";
$msg .= "Content-Transfer-Encoding: 8bit\r\n";
$msg .= "Name: $name\n";
$msg .= "E-mail: $email\n";
$msg .= "Title: $title\n";
$msg .= "Comment: $comment\n";
$msg .= "Agree: $agree\r\n\n";
$msg .= "--{$str}\r\n";

$msg .= "Content-Type: {$att_type}; ";
$msg .= "name=\"{$att_name}\"\r\n";
$msg .= "Content-Disposition: attachment; ";
$msg .= "filename=\"{$att_name}\"\r\n";
$msg .= "Content-Transfer-Encoding: base64\r\n";
$msg .= "$file\r\n\n";
$msg .= "--{$str}";

mail($to"Submission"$msg$hdr);
echo(
"<center><p>Submission Sent.</p></center>");