I have a code in PHP sending the message with an attachment. Code works fine instead of attachment. When I attach the file and click "Wyślij wiadomość" (Send) I have a message in my mailbox but there`s nothing attached. I think that I did something wrong with the place I put $formFile
 $mailText = "Treść wiadomości:\n$formText\nOd: $formName, $formEmail, $formFile, ($ip, $host)";
Here`s the full code:
<?php
//--- początek formularza ---
if(empty($_POST['submit'])) {
?>
            <form action="" method="post" enctype="multipart/form-data">
                        <table class="col-md-10 col-sm-12 col-xs-12">
                            <tr>
                                <td class="col-md-2">NAZWISKO:<br /><br/></td>
                                <td><input type="text" name="formName" /></td>
                            </tr>
            <tr>
                            <td class="col-md-2">E-MAIL:<br /><br/></td>
                            <td><input type="text" name="formEmail"/></td>
                        </tr>
                        <tr>
                            <td class="col-md-2">ZAŁĄCZ KOSZTORYS:<br /><br/></td>
                            <td><input type="file" name="formFile" /></td>
                        </tr>
                        <tr>
                            <td class="formularzTresc col-md-2">TREŚĆ:<br /><br/></td>
                            <td><textarea name="formText"></textarea></td>
                        </tr>
                        <tr>
                            <td></td>
                            <td><p align="right"><input type="submit" name="submit" value="Wyślij wiadomość" /><p></td>
                        </tr>
                        </table>
                    </form>
<?php
} else {
//twoje dane
$email = 'e-mail';
//dane z formularza
$formName = $_POST['formName'];
$formEmail = $_POST['formEmail'];
$formText = $_POST['formText'];
$formFile = $_FILES['formFile'];
if(!empty($formName) && !empty($formEmail) && !empty($formText)) {
//--- początek funkcji weryfikującej adres e-mail ---
function checkMail($checkmail) {
  if(filter_var($checkmail, FILTER_VALIDATE_EMAIL)) {
    if(checkdnsrr(array_pop(explode("@",$checkmail)),"MX")){
        return true;
      }else{
        return false;
      }
  } else {
    return false;
  }
}
//--- koniec funkcji ---
if(checkMail($formEmail)) {
  //dodatkowe informacje: ip i host użytkownika
  $ip = $_SERVER['REMOTE_ADDR'];
  $host = gethostbyaddr($_SERVER['REMOTE_ADDR']);
  //tworzymy szkielet wiadomości
  //treść wiadomości
  $mailText = "Treść wiadomości:\n$formText\nOd: $formName, $formEmail, $formFile, ($ip, $host)";
  //adres zwrotny
  $mailHeader = "From: $formName <$formEmail>\r\n";
    $mailHeader .= "Content-type: text/plain; charset=utf-8\r\n";
        $target_path = "../przeslanePliki";
        $target_path = $target_path . basename( $_FILES['formFile']['name']);
if(move_uploaded_file($_FILES['formFile']['tmp_name'], $target_path)) {
    echo "The file ".  basename( $_FILES['formFile']['name']). 
    " has been sent. ";
} else{
    echo "Problem with sending the file.";
}
  //funkcja odpowiedzialna za wysłanie e-maila
  @mail($email, 'Pytanie do eksperta', $mailText, $mailHeader) or die('Błąd: wiadomość nie została wysłana');
  //komunikat o poprawnym wysłaniu wiadomości
  echo 'Wiadomość została wysłana';
} else {
  echo 'Adres e-mail jest niepoprawny';
}
} else {
  //komunikat w przypadku nie powodzenia
  echo 'Wypełnij wszystkie pola formularza';
}
//--- koniec formularza ---
}
?>