Jump to content

Recommended Posts

Hey

 

My problem with the form is that when i write in Bulgarian and send the message I recive email with all sort of characters but not Bulgarian. 

 

 


I have uploaded the file becouse it looks wors in the forum


<?php


  //
  $uploaded_file = array("txt","doc","docx");
  foreach ($_FILES as $file) {
    if ($file['tmp_name'] > '') {
      if (!in_array(end(explode(".",
            strtolower($file['name']))),
            $uploaded_file)) {
       die($file['name'].' файлът не невалиден!<br/>'.
        '<a href="javascript:history.go(-1);">'.
        '<&lt Назад</a>');
      }
    }
  } 
$target_path = "uploads/";
echo "<p>Благодаря ви <b>$_POST[name]</b>, Ващето съобщение беше изпратено успешно.</p>";


/*Моля промени: echo "The file http://blog-bored.com/websites/translateagency/uploads/". 
с сайта в който ще се качва файла. Трябва да имаш папка uploads с 777 разрешение.*/

$target_path = $target_path . basename( $_FILES['uploaded_file']['name']); 

if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $target_path)) {
    echo "The file http://blog-bored.com/websites/translateagency/uploads/".  basename( $_FILES['uploaded_file']['name']). 
    " has been uploaded";
} else{
    echo "Грешка при качване на файла!";
}	


$name=$_POST['name'];
$familiq=$_POST['familiq'];
$telefon=$_POST['telefon'];
$grad=$_POST['grad'];
$durjava=$_POST['durjava'];
$email=$_POST['email'];
$syobshtenie=$_POST['syobshtenie'];
$target_path=$_POST['uploaded_file'];




$to = "raddy@inked-world.com";
$subject="Translation Agency - Нов документ";
$message="";
$message.= "Dear Admin,<br><br>\n";
$message.= "Имате ново писмо от Translation Agency.<br><br>\n";
$message.= "Детайли<br><br>\n";
$message.= ".....................................<br><br>\n";

$message.="<b>Име:</b> ".$name.".<br><br>\n";
$message.="<b>Фамилия:</b> ".$familiq.".<br><br>\n";
$message.="<b>Телефон:</b> ".$telefon.".<br><br>\n";
$message.="<b>Град:</b> ".$grad.".<br><br>\n";
$message.="<b>Държава:</b> ".$durjava.".<br><br>\n";
$message.="<b>Email:</b> ".$email.".<br><br>\n";
$message.="<b>Съобщение:</b> ".$syobshtenie.".<br><br>\n";
$message.="<b>Прикачен файл:</b>  http://traduttore.ueuo.com/uploads/".basename( $_FILES['uploaded_file']['name'])."<br><br>\n";


$headers = "MIME-Version: 1.0\r\n"; 
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
$headers .= "From:".$name."<".$email.">\r\n"; 
$headers .= "Reply-To:".$name."<".$email.">\r\n";
    $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n";
    $headers .= "X-Priority: 1";
mail($to,$subject,$message,$headers);




?>

<a href="#"><b>Back</b></a>



 

[attachment deleted by admin]

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.