<input type="file" name="file-input">
<?php
$method = $_SERVER['REQUEST_METHOD'];
//Script Foreach
$c = true;
$admin_email = "maxnrg33@gmail.com";
$project_name = "Ремонт Дмитров";
$form_subject = "Заявка с сайта \"$project_name\"";
$server_mail = "remont.dmitrov.2015@yandex.ru";
foreach ( $_POST as $key => $value ) {
if ( $value != "" && $key != "project_name" && $key != "admin_email" && $key != "form_subject" ) {
$message .= "
" . ( ($c = !$c) ? '<tr>':'<tr style="background-color: #f8f8f8;">' ) . "
<td style='padding: 10px; border: #e9e9e9 1px solid;'><b>$key</b></td>
<td style='padding: 10px; border: #e9e9e9 1px solid;'>$value</td>
</tr>
";
}
}
$message = "<table style='width: 100%;'>$message</table>";
mail($admin_email, $form_subject, $message, "From: $project_name <$server_mail>" . "\r\n" . "Reply-To: $admin_email" . "\r\n" . "X-Mailer: PHP/" . phpversion() . "\r\n" . "Content-type: text/html; charset=\"utf-8\"");